﻿var dropdowntimer=new Array(10);

var browser=navigator.appName  
var b_version=navigator.appVersion  
var version=b_version.split(";");  
var trim_Version=version[1].replace(/[ ]/g,"");  
if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0")  
{
  document.execCommand("BackgroundImageCache", false, true);
}

function trim() {
return this.replace(/\s+$|^\s+/g,"");
}
String.prototype.trim=trim;

function verifyImg(byid)
{
	var timenow = new Date().getTime();
	url="VerifyImage.aspx?t="+ timenow;
	document.getElementById(byid).src=url;
}

function LoadFlash(url,wmode,width,Height)
{ 
document.write(
  '<object width="' + width +'" height="' + Height + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"><param name="movie" value="' + url + '"><param name="wmode" value="'+wmode+'"><param name="quality" value="autohigh"><param name="menu" value="false"><embed width="' + width +'" height="' + Height + '" src="' + url + '"  quality="autohigh" wmode="' + wmode + '" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>');   
}

function showHide(byid) {
  if (document.getElementById(byid)) {
    if (document.getElementById(byid).style.display == "none") {
      document.getElementById(byid).style.display = "block";
    } else {
    document.getElementById(byid).style.display = "none";
    }
  }
}

function searchSubmit()
{
  if(document.getElementById("s_key").value.replace(/Please enter keyword!/g,"").trim()=="")
    {
        document.getElementById("s_key").value="Please enter keyword!";
    }
	else
    {
        location.href="products.aspx?key="+escape(document.getElementById("s_key").value);
    }
  }

function leftmenu(byid)
{
  if (document.getElementById('left_' + byid)) {
    if (document.getElementById('left_' + byid).style.display == "none") {
      document.getElementById('left_' + byid).style.display = "block";
      document.getElementById('leftico_' + byid).src = "images/ico_03.gif";
    }
    else {
      document.getElementById('left_' + byid).style.display = "none";
      document.getElementById('leftico_' + byid).src = "images/ico_02.gif"
    }
  }
}