var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-10236315-1");
pageTracker._trackPageview();
} catch(err) {}

var tid=null;
var mid=null;
var par=null;
var	imgn=new Array('logo','home','mail','note','online','unlock','cart','info');
var	imgs=new Array();

ie=navigator.appName=='Microsoft Internet Explorer';

function loadImgs(src){
	var i=imgs.length;
	imgs[i]=new Image(32,32);
	imgs[i].src=src;
}
for(var i=0; i<imgn.length; i++){
	loadImgs('/images/'+imgn[i]+".gif");
	loadImgs('/images/'+imgn[i]+"_.gif");
}

function stopTimer(){
	clearTimeout(tid);
}
function startTimer(){
	tid=setTimeout("hidesub()", 800);
}
function hidesub(){
	if (mid){
//		mid.style.zIndex=-2;
		mid.style.visibility='hidden';
		mid.style.top='';
		mid.style.left='';
		par.style.background='';
	}
}

function showsub(name, parent){
	if (name>''){
		stopTimer();
		if (mid && (mid.id==name)&&(mid.style.left>''))return;
		hidesub();
		par=parent;
		mid=document.getElementById(name);
		newLeft=mid.offsetLeft+par.offsetWidth-20;
		par.style.background='#ffa851';
//		mid.style.top=par.offsetTop+'px';//mid.offsetTop-par.offsetHeight-1+'px';
		if (ie){
			mid.style.top=par.offsetTop+par.offsetHeight-1+document.getElementById('goods_menu').offsetTop+'px';
		}
		else{
			mid.style.top=par.offsetTop+'px';
		}
		mid.style.visibility='visible';
	}
	if (mid.offsetLeft<newLeft){
		mid.style.left=mid.offsetLeft+10+'px';
		setTimeout("showsub('','')", 10);
	}
	else{
//		mid.style.zIndex=1;
	}
	
}

var obj1, id1;
function down(i,n){
	var obj=document.getElementById(i);
	
	if (obj.childNodes[n].style){
		obj.childNodes[n].style.display='block';
	}
	n--;
	if (n>=0){
		setTimeout("down('"+i+"','"+n+"')", 15);
	}
}
function up(i,n){
	var obj=document.getElementById(i);
	if (obj.childNodes[n].style){
		obj.childNodes[n].style.display='none';
	}
	n++;
	if (n<obj.childNodes.length){
		setTimeout("up('"+i+"','"+n+"')", 10);
//		up(i,n);
	}
	else{
		obj.style.display='none';
		if (obj1){
			obj1=null;
			shblock(id1)
		}
		else{obj1=null}
	}
}

function shblock(objid){
	if(obj1 && obj1.id!=objid){
		id1=objid;
		up(obj1.id,0);
		return false;
	}
	obj1=document.getElementById(objid);
	if (obj1.style.display=='none'){
		obj1.style.display='block';
		down(objid,obj1.childNodes.length-1);
	}
	else{
		obj1=null;
		up(objid,0);
	}
}

