// when mouse over, change the image
function change_image(_this,x){
	_this.src=x;
}

//show and hide second menu
function show_hide(x,y){
	a=document.getElementById(x);
	d=document.getElementById(y);
	if (d.style.display=="none"){
		a.src="/images/common/arrow_on.gif";
		d.style.display="";
	}
	else {
		a.src="/images/common/arrow_off.gif";
		d.style.display="none";
	}
}

//check the menu arrow
function checkitem(){
	if(document.getElementById("Audio & Multimedia").style.display!="none"){document.getElementById("arrow_01").src="/images/common/arrow_on.gif";}
	if(document.getElementById("Business").style.display!="none"){document.getElementById("arrow_02").src="/images/common/arrow_on.gif";}
	if(document.getElementById("Games & Entertainment").style.display!="none"){document.getElementById("arrow_03").src="/images/common/arrow_on.gif";}
	if(document.getElementById("Home & Education").style.display!="none"){document.getElementById("arrow_04").src="/images/common/arrow_on.gif";}
	if(document.getElementById("Internet").style.display!="none"){document.getElementById("arrow_05").src="/images/common/arrow_on.gif";}
	if(document.getElementById("Software Development").style.display!="none"){document.getElementById("arrow_06").src="/images/common/arrow_on.gif";}
	if(document.getElementById("Utilities").style.display!="none"){document.getElementById("arrow_07").src="/images/common/arrow_on.gif";}
	if(document.getElementById("Web Authoring").style.display!="none"){document.getElementById("arrow_08").src="/images/common/arrow_on.gif";}
}

//for dvd-to-ipod.html page
function choose_p(t,c,x){
	for(i=1;i<=x;i++){
		document.getElementById("tab"+i).className="choose_off";
		document.getElementById("content"+i).style.display="none";
	}
	document.getElementById(t).className="choose_on";
	document.getElementById(c).style.display="";
}



//for search
function search_onfocus()
{
	if(document.getElementById("q").value=="Search..."){document.getElementById("q").value="";}
}
	
function search_onblur()
{
	if(document.getElementById("q").value==""){document.getElementById("q").value="Search...";}
}

function submit_check(){
	if(document.getElementById("q").value=="Search...")	{alert("Please Input Your Keywords.");}
	else document.searchform.submit();
}
