﻿// JavaScript Document
//----------begin   :command function-----------------------------
//��ҳ�͵�2��categoryҳ:�л����1
var selectItem ={
 cur_n:1,

 //pic_down:"images/skin01/bt_down.gif",
 //pic_up:"images/skin01/bt_up.gif",

 clickitem:function(n){
  if (selectItem.cur_n==n) {
	return;
  }
 pic_down="bt_down.gif";
 pic_up="bt_up.gif"; 
 var d_old=document.getElementById("item"+selectItem.cur_n);
 //var d_icon_old=document.getElementById("item_icon"+selectItem.cur_n);
 if (d_old){
 d_old.className="title2";
 //d_icon_old.src=d_icon_old.src.replace(pic_up,pic_down);
 document.getElementById("item_src"+selectItem.cur_n).style.display="none";
 }

 var d=document.getElementById("item"+n);
 var d_icon=document.getElementById("item_icon"+n);
 var d_src=document.getElementById("item_src"+n);

 d.className="title1";
 //d_icon.src=d_icon.src.replace(pic_down,pic_up);//selectItem.pic_up;
 d_src.style.display="";
 selectItem.cur_n=n;
 }

}
//��ҳ�͵�2��categoryҳ�л����2
var ads2Timer = null;
var ads2CurNo= 1;
function showPic(whichpic,n)
{
var source= whichpic.getAttribute("src");
var url= whichpic.getAttribute("url");
var target=whichpic.getAttribute("target");
var placeholder= document.getElementById("placeholder");
var str=placeholder.setAttribute("src",source);
document.getElementById('placeholder_url').href=url;
document.getElementById('placeholder_url').target=target;

	for (var i=1;i<=3;i++){
		document.getElementById('ads2_arrow'+i).style.display="none";
		document.getElementById('ads2_div'+i).className="title1";
	}
	document.getElementById('ads2_arrow'+n).style.display="";
	document.getElementById('ads2_div'+n).className="title2";
	ads2CurNo++;
	if (ads2CurNo>3) ads2CurNo = 1;
	clearTimeout(ads2Timer);
	ads2Timer = setTimeout('showAds2()',5000);
}
function showAds2(){
	var o = document.getElementById('ads2_pic'+ads2CurNo);
	showPic(o,ads2CurNo);
}

//��������9����Ʒ
function ClearLastGoods(){ 	
 	//ajax to clear... 
 	Ajax.call('ClearLastGoods.php','',clearProductBack,'JSON'); 
} 
function clearProductBack(_r) { 	
 		document.getElementById('visitedPro').style.innerHTML=""; 	
 		document.getElementById('visitedPro').style.display="none"; 	
}
	//foot :�ı�url
function footChangeUrl(){
	return false;
}
//----------end   :command function-------------------------------

//----------begin :function of header part -----------------------
//top�У���Ʒ������-��ʾ���ع���,��Ҫ�ƶ�������
function getLayer(){
	document.getElementById("layer").style.display="";

	if(the_subject=document.getElementsByTagName("select")){
		for(x=0;x<the_subject.length;x++){
		  document.getElementsByTagName("select")[x].style.display="none";
		}
	 }

 	//document.getElementById("category").style.display=""; 
}

function hiddenLayer(){
  	document.getElementById("layer").style.display="none"
	if(the_subject=document.getElementsByTagName("select")){
		for(x=0;x<the_subject.length;x++){
		  document.getElementsByTagName("select")[x].style.display="";
		}
	}
   //document.getElementById("category").style.display="";
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//----------end   :function of header part -----------------------



//�����

function pop_window(){
	window.open("/index.html","","width=703,height=473,location=no,status=no");
}