//------------------1024*768 Css-----------------------------

function ScreenWidth(CSS1,CSS2)
{  
	if ((screen.width == 1024) && (screen.height == 768))
	{   
		setActiveStyleSheet('1024','1200');   
	}
	else
	{   
		if ((screen.width == 1152) && (screen.height == 864))
		{   
			setActiveStyleSheet('1152','1200');   
		}
		else 
		{
			var _width = 18;
			if (window.navigator.userAgent.indexOf("MSIE")>=1)  _width = _width + 4;
			setActiveStyleSheet('other',screen.width - _width);
		}
	}   
}   
function setActiveStyleSheet(css,wid){    
	$('storediv').className= 'IE'+css;
	$('storediv1').className='IE'+css+'_1';
	$('storediv2').className='IE'+css+'_2';

	$('storediv').style.width = wid + 'px';
	$('storediv1').style.width = wid + 'px';
	$('storediv2').style.width = wid + 'px';
}


//----------------------------------------------
function getCurrentStyleProperty(pObj,pProperty){
	try{ 
		if(pObj.currentStyle)
			return eval("pObj.currentStyle." + pProperty);
	else
		return document.defaultView.getComputedStyle(pObj,"").getPropertyValue(pProperty);
	}catch(e){
		alert(e);
	}
}
function $(pId){
	return document.getElementById(pId);
}

function getScrollPos(){
	if(document.defaultView)
		return {x:document.defaultView.scrollX,y:document.defaultView.scrollY};
	else if(document.documentElement)
		return {x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};
	else
		return {x:document.body.scrollLeft,y:document.body.scrollTop}
		
}
var x = 0;
var xStep = 10;
var interval = null;
function xScrollByOrg(pWidth){
	var orgPos = getScrollPos();
	
	if(Math.abs(x) >= Math.abs(pWidth)){
		
		clearInterval(interval);
		x = 0;
		interval = null;
	}else{
		x += (pWidth > 0 ? xStep : - xStep);
		window.scrollBy(pWidth > 0 ? xStep : -xStep,orgPos.y);
		if(interval == null)
			interval = setInterval("xScrollByOrg(" + pWidth + ")",10);
	}
}


function correctPNG()  
{ 
	for(var i=0; i<document.images.length; i++) 
	{ 
	   var img = document.images[i] 
	   var imgName = img.src.toUpperCase() 
	   if (imgName.substring(imgName.length-3, imgName.length) == "PNG") 
	   { 
		   var imgID = (img.id) ? "id='" + img.id + "' " : "" 
		   var width = img.width
		   var height = img.height

		   if(img.id == "iconon2")
		   {
			   width = "38"
			   height = "31"
		   }
		   else if(img.id == "iconhelp2"){
			   width = "37"
			   height = "31"
		   }
		   else if(img.id == "icone2")
		   {
			   width = "112"
			   height = "31"
		   }
		   else if(img.id == "checkout")
		   {
			   width = "16"
			   height = "16"
		   }
		   var imgClass = (img.className) ? "class='" + img.className + "' " : "" 
		   var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " 
		   var imgStyle = "display:inline-block;" + img.style.cssText  
		   if (img.align == "left") imgStyle = "float:left;" + imgStyle 
		   if (img.align == "right") imgStyle = "float:right;" + imgStyle 
		   if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle   
		   var strNewHTML = "<span " + imgID + imgClass + imgTitle 
		   + " style=\"" + "width:" + width + "px; height:" + height + "px;" + imgStyle + ";" 
		   + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" 
		   + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"  
		   img.outerHTML = strNewHTML 
		   i = i-1 
	   } 
	} 
} 

if (window.navigator.userAgent.indexOf("MSIE")>=1) window.attachEvent("onload", correctPNG);  



