function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

 function menuOver(item)
 {
	if(item.className.indexOf('topActiveMenu') == -1)
 		item.style.backgroundColor="#5C5C5C";
 	if (document.getElementById("shopBrandListImg"))
	{
		document.getElementById("shopBrandListImg").src = document.getElementById("shopBrandListImg").src.replace("btn_shophere", "btn_shophere_up");
	}
 }
 function menuOut(item)
 {
	if(item.className.indexOf('topActiveMenu') == -1)
	{
		item.style.backgroundColor="#FDE100";
	}
 	if (document.getElementById("shopBrandListImg"))
	{
		document.getElementById("shopBrandListImg").src = document.getElementById("shopBrandListImg").src.replace("btn_shophere_up", "btn_shophere");
	}
 }
function BtnOver(obj, path, langId) {
   obj.src=path + "_o_" + langId + ".gif";
}

function BtnOut(obj, path, langId) {
   obj.src=path + "_" + langId + ".gif";
}

function getCookie(name){
   var cookieName = name + "=";
   var docCookie = document.cookie;
   var cookieStart
   var end

   if (docCookie.length>0){
	   cookieStart = docCookie.indexOf(cookieName);
	   if (cookieStart != -1){	
		   cookieStart = cookieStart + cookieName.length;
		   end = docCookie.indexOf(";",cookieStart);
		   if (end == -1){
   			end = docCookie.length;
		   }
		   return unescape(docCookie.substring(cookieStart,end));
      }
   }
   return false;
}


function gReplace(strText, strOChars, strNChars)
{
	if (strText)
	{
	var strReplaceAll = strText;
	var intIndexOfMatch = strReplaceAll.indexOf( strOChars );

	while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( strOChars, strNChars )
	intIndexOfMatch = strReplaceAll.indexOf( strOChars );
	}
	return strReplaceAll;
	}
}
