var HeadTag=null;
 screenWidth = screen.width;
 //================***********************==============================
     var scrWidth = window.screen.width;
    var scrHeight = window.screen.height;
    var pageHeight=790;
    var pageWidth = 1220;
    
    if((window.navigator.platform.toLowerCase()=='macppc')&& (navigator.appName.toLowerCase() == 'netscape'))
    {   if(scrHeight<pageHeight)
         scrWidth = scrWidth - 19;
    }

    else
    {
    if(scrHeight<pageHeight) //if no vertical scroll
    {
        if(navigator.appName == 'Microsoft Internet Explorer')
        scrWidth = scrWidth - 21 ;
        else
        {
        scrWidth = scrWidth -  17;//(window.outerWidth - window.innerWidth)
        }
//mainDivWidth = scrWidth;
    }
    
    else
    {
    if(navigator.appName == 'Microsoft Internet Explorer')//IE alway leave the vertical scroll bar space, no matter whether it is there or not
    scrWidth = scrWidth - 21;
    }
    }

    
    var _bgLeft = "0px";
    var _bgWidth = "1220px";
    var mainDivWidth = "1220px";

    
    
    var setWidth= pageWidth;//1164;
    
    var pgWidth = pageWidth;//1164;


    if(scrWidth<pgWidth)
    {
    setWidth = scrWidth;
    var diffwidth =  pgWidth - scrWidth;
    var setLeft = 0;

    if(diffwidth>0)
    {
     setLeft=(diffwidth/2);
    _bgLeft= '-' + setLeft + 'px';
    }

_bgWidth=setWidth + setLeft + 'px';
mainDivWidth = setWidth + 'px';


}
else
{
_bgWidth = pgWidth + 'px';
_bgLeft =  '0px';
mainDivWidth = pgWidth + 'px';
}

//alert(_bgWidth + '  '+ _bgLeft + ' ' + mainDivWidth);
if (screenWidth >= 1024) {
document.write("<style>#_bg{left:" + _bgLeft + ";}#mainDiv{width:" + mainDivWidth +";}</style>");
  //alert('Chopping');
}
else {
    //alert('no Chopping');
}
