// JavaScript Document
window.onload = function(){
 var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++)
{
if (inputs[i].getAttribute("type") == "text" || inputs[i].getAttribute("type") == "password")
{
 inputs[i].className = "input_text";
 inputs[i].onfocus = function(){this.className = "input_onfocus";}
 inputs[i].onblur = function(){this.className = "input_text";}
 //inputs[i].onmouseover = function(){this.className = "input_over";}
 //inputs[i].onmouseout = function(){this.className = "input_text";}
}
}
}

function openAccount() {
this.document.getElementById('accountList').style.display = "block";
}
function closeAccount() {
this.document.getElementById('accountList').style.display = "none";
}


function openCurrency() {
this.document.getElementById('currencyList').style.display = "block";
}
function closeCurrency() {
this.document.getElementById('currencyList').style.display = "none";
}

function openList1() {
this.document.getElementById('shopByPrice').style.display = "block";
}
function closeList1() {
this.document.getElementById('shopByPrice').style.display = "none";
}

function openList2() {
this.document.getElementById('shopByMaterial').style.display = "block";
}
function closeList2() {
this.document.getElementById('shopByMaterial').style.display = "none";
}

function openList3() {
this.document.getElementById('shopByType').style.display = "block";
}
function closeList3() {
this.document.getElementById('shopByType').style.display = "none";
}

function openList4() {
this.document.getElementById('shopByPrice1').style.display = "block";
}
function closeList4() {
this.document.getElementById('shopByPrice1').style.display = "none";
}

function openList5() {
this.document.getElementById('shopByBrands1').style.display = "block";
}
function closeList5() {
this.document.getElementById('shopByBrands1').style.display = "none";
}

function openList6() {
this.document.getElementById('shopByColor1').style.display = "block";
}
function closeList6() {
this.document.getElementById('shopByColor1').style.display = "none";
}



//<!CDATA[
function g(o){return document.getElementById(o);}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=3;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';
}
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
//]]>

var Mouse_Obj="none",_x,_y;
document.onmousemove=function()
{
	if(Mouse_Obj!=="none")
	{
	document.getElementById(Mouse_Obj).style.left=_x+event.x;
	document.getElementById(Mouse_Obj).style.top=_y+event.y;
	event.returnValue=false;
	}
}
document.onmouseup=function()
{
	Mouse_Obj="none";
}
function m(o)
{
	Mouse_Obj=o;
	_x=parseInt(document.getElementById(Mouse_Obj).style.left)-event.x;
	_y=parseInt(document.getElementById(Mouse_Obj).style.top)-event.y;
}

