


marqueesHeight = document.getElementById("main-content").clientHeight-17;
var sideKey=document.getElementById("ctl00_SideCategories1_DataList1");

if(sideKey!=null)
{
marqueesHeight -= document.getElementById("ctl00_SideCategories1_DataList1").clientHeight;
}

stopscroll=false;
var imageList=document.getElementById("imageList");
var preScrolTop=imageList.clientHeight;
if(imageList.clientHeight>50)
{
	imageList.innerHTML+=imageList.innerHTML;
    while(imageList.clientHeight<marqueesHeight*2)
    {
	    imageList.innerHTML+=imageList.innerHTML;
    }
}
//with(imageList){
		imageList.style.height=marqueesHeight+"px";
        imageList.style.overflowX="visible";
        imageList.style.overflowY="hidden";
        imageList.noWrap=true;
		imageList.onmouseover=new Function("stopscroll=true;");
		imageList.onmouseout=new Function("stopscroll=false;");
//	}
	preTop=0; currentTop=marqueesHeight; stoptime=0;

function init_srolltext(){
	imageList.scrollTop=0;
	setInterval("scrollUp()",preTime);
}
function scrollUp(){
    if(!stopscroll)
    {
	    imageList.scrollTop+=preLength;
	    if(imageList.scrollTop>=preScrolTop)
	    {
	        imageList.scrollTop=0;
	    }
	}

}
init_srolltext();


function getEnvBrowser(){
 var appName=navigator.appName;
 if (navigator.appName=="Microsoft Internet Explorer"){
  varMS=navigator.appVersion.indexOf("MSIE")
  if (varMS>0) {
   a=navigator.appVersion.substring(varMS+5,varMS+8)
   appName = "IE " + a ;
  }
 }else{
     var a = parseInt(navigator.appVersion);
  appName = appName + a;
 }
 return appName;
}

function setPngImage(pngImage)
{
    var s=pngImage.src;
    pngImage.src="Images/x.gif";
    pngImage.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+s+"', sizingMethod='crop')";
}

function setPngImageAuto(pngImage)
{
    var s=pngImage.src;
    pngImage.src="Images/x.gif";
    pngImage.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+s+"', sizingMethod='auto')";
}

function setpng()
{
    if(getEnvBrowser()=="IE 6.0")
    {
        isIE6=true;
        setPngImage(document.getElementById("topFade"));
        setPngImage(document.getElementById("bottomFade"));    
        
        try
        {
            var arrowImage=document.getElementById("menuArrow").all[0];
            arrowImage.style.width=9+"px";
            arrowImage.style.height=19+"px";
            setPngImage(arrowImage); 
                   
            var menuImage1=document.getElementById("ctl00_Menu1_Menu1-menuItem000").all[0];
            menuImage1.style.width=66+"px";
            menuImage1.style.height=53+"px";
            setPngImage(menuImage1); 
            
            var menuImage2=document.getElementById("ctl00_Menu1_Menu1-menuItem001").all[0];
            menuImage2.style.width=66+"px";
            menuImage2.style.height=53+"px";
            setPngImage(menuImage2); 
            
            var menuImage3=document.getElementById("ctl00_Menu1_Menu1-menuItem002").all[0];
            menuImage3.style.width=66+"px";
            menuImage3.style.height=53+"px";
            setPngImage(menuImage3);
        }
        catch(err)
        {}
          
        var imgArr = document.getElementsByTagName("IMG");
        for(i=0; i<imgArr.length; i++){
           if(imgArr[i].src.toLowerCase().lastIndexOf(".png") != -1){
           setPngImageAuto(imgArr[i]);
           }
        }
        
        var imgArr = document.getElementsByTagName("input");
        for(i=0; i<imgArr.length; i++){
           if(imgArr[i].type=='image' && imgArr[i].src.toLowerCase().lastIndexOf(".png") != -1){
           setPngImageAuto(imgArr[i]);
           }
        }
        
    }
}