// JavaScript Document
function show_pics(picurl)
{
	var image=new Image(); 
 	image.src=document.getElementById('pics').src;
	var w = 295;
	if(image.width>w){ 
		flag=true;
		document.getElementById('pics').width=w;
	}
	document.getElementById('pics').src =picurl;
	document.getElementById('pics1').href =picurl;
}
function hiddenmsg(){
	if (document.getElementById('hiddenmsg').style.display == 'none')
		{
			document.getElementById('hiddenmsg').style.display="block";
			document.getElementById('keqq').src ="/images/mingle/sertop.gif";
		}
		else
		{
			document.getElementById('hiddenmsg').style.display="none";
			document.getElementById('keqq').src ="/images/mingle/sertop_close.gif";
		}
}
function show_s(id)
{

	if (document.getElementById('u'+id).style.display == 'none')
		{
			document.getElementById('u'+id).style.display="block";
		}
		else
		{
			document.getElementById('u'+id).style.display="none";
		}
}
function searchAth()
{
  var ath = document.getElementById("words").value;
  if(ath!=null&&ath!=""&&ath!="产品搜索")
  {
					 
		document.searchBox.action='/searchResults.asp';  
		document.searchBox.submit();


  }

}
function searchAth_e()
{
  var ath = document.getElementById("words").value;
  if(ath!=null&&ath!=""&&ath!="Search")
  {
					 
		document.searchBox.action='/searchResults-e.asp';  
		document.searchBox.submit();


  }

}
function checkmyform()
{
   if(checkspace(document.myform.linkname.value)) {
	document.myform.linkname.focus();
    alert("对不起，网站名称不能为空！");
	return false;
  }

     if(checkspace(document.myform.linkurl.value)) {
	document.myform.linkurl.focus();
    alert("对不起，网站地址不能为空！");
	return false;
  }
  if(document.myform.linkurl.value=='http://') {
	document.myform.linkurl.focus();
    alert("对不起，网站地址不能为空！");
	return false;
  }
   if(checkspace(document.myform.linkdesc.value)) {
	document.myform.linkdesc.focus();
    alert("对不起，网站简介不能为空！");
	return false;
  }

}
function checkmyform1()
{
   if(checkspace(document.myform.linkname.value)) {
	document.myform.linkname.focus();
    alert("Sorry,the website name can not be empty!");
	return false;
  }

     if(checkspace(document.myform.linkurl.value)) {
	document.myform.linkurl.focus();
    alert("Sorry,the website can not be empty!");
	return false;
  }
  if(document.myform.linkurl.value=='http://') {
	document.myform.linkurl.focus();
    alert("Sorry,the website can not be empty!");
	return false;
  }
   if(checkspace(document.myform.linkdesc.value)) {
	document.myform.linkdesc.focus();
    alert("Sorry,the website profile can not be empty!");
	return false;
  }

}

function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

var flag=false; 
function DrawImage(ImgD){ 
 	var image=new Image(); 
 	image.src=ImgD.src;
	var w = 295;
	if(image.width>w){ 
		flag=true;
		ImgD.width=w;
	}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function sethome()
{
	this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.020tongsheng.com');
}
function addbookmark()
{
    var nome_sito = "广州通盛";
    var url_sito = "http://www.020tongsheng.com";
    if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt
        (navigator.appVersion) >= 4))
        window.external.AddFavorite(url_sito, nome_sito);
    else if (navigator.appName == "Netscape")
        window.sidebar.addPanel(nome_sito, url_sito, '');
    else
        alert("Sorry!Cann't Add this site to your favorite!.");
}

