﻿// JavaScript Document
function leftOver(overId,overLast)
{
	if(overLast=='overlast')
	overId.className='lioverlast';
	else
	overId.className='liover';
}
function leftOut(outId,outLast)
{
	if(outLast=='outlast')
	outId.className='lioutlast';
	else
	outId.className='liout';
}
function supportId(supid)
{
	document.getElementById('supimg1').src='../images/Support1.jpg';	
	document.getElementById('supimg2').src='../images/Support2.jpg';
	
	document.getElementById('div1').style.display='none';
	document.getElementById('div2').style.display='none';
	
	document.getElementById('supimg'+supid).src='../images/Support'+supid+'_1.jpg';
	document.getElementById('div'+supid).style.display='block';
}
function iproshow(proid)
{
	for(var i=1;i<=3;i++)
	{
		document.getElementById('imgshow'+i).src='images/iproshow'+i+'.jpg';
		document.getElementById('dproshow'+i).style.display='none';
	}
	document.getElementById('imgshow'+proid).src='images/iproshow'+proid+'_1.jpg';
	document.getElementById('dproshow'+proid).style.display='block';
}
function chreturn(mobj)
{
	if(mobj.cname.value=='')
	{
		alert('姓名不能为空');
		mobj.cname.focus();
		return false;
	}
	if(mobj.tel.value=='')
	{
		alert('联系电话不能为空');
		mobj.tel.focus();
		return false;
	}
	if(mobj.mail.value=='')
	{
		alert('电子邮件不能为空');
		mobj.mail.focus();
		return false;
	}
	if(mobj.pro.value=='')
	{
		alert('感兴趣的产品不能为空');
		mobj.pro.focus();
		return false;
	}
	if(mobj.cinfo.value=='')
	{
		alert('留言信息不能为空');
		mobj.cinfo.focus();
		return false;
	}
	return true;
}
function tproimg(tproid)
{
	for(var i=1;i<=4;i++)
	{
		document.getElementById("tpro"+i).src="../images/tpro"+i+".jpg";	
	}
	document.getElementById("tpro"+tproid).src="../images/tpro"+tproid+"_1.jpg";	
}
function iproimg(tproid)
{
	for(var i=1;i<=4;i++)
	{
		document.getElementById("tpro"+i).src="images/ipro"+i+".jpg";	
	}
	document.getElementById("tpro"+tproid).src="images/ipro"+tproid+"_1.jpg";	
}