﻿//设置图片地址
var myurl="/publicfiles//htmltemplate/fschancheng/"
//设置链接地址

function picview()//旅游中滚动图片链接到图片库
{
	window.location="/publicfiles/business/htmlfiles/fschancheng/pcitypostcard02/list.htm";
}

function citizen()//受重用户中市民的链接路径
{
	window.location="/publicfiles/business/htmlfiles/fschancheng/pcccitizenchannel/list.htm";
}

function enterprise()//受重用户中企业的链接路径
{
	window.location="/publicfiles/business/htmlfiles/fschancheng/pccenterprisechannel/list.htm";
}


function invest()//受重用户中投资的链接路径
{
	window.location="/publicfiles/business/htmlfiles/investfscc/index.htm";
}

function tour()//受重用户中旅游的链接路径
{
	window.location="/publicfiles/business/htmlfiles/fschancheng/pcctravelchannel/list.htm";
}

function mygb()//简体版
{
	window.location="http://www.chancheng.gov.cn/publicfiles/business/htmlfiles/fschancheng/index.htm";
}

function mybig5()//繁体版
{
	window.location="http://www.chancheng.gov.cn:81/publicfiles/business/htmlfiles/fschancheng/index.htm";
}

function myenglish()//english
{
	window.open("/publicfiles/business/htmlfiles/fschancheng-en/index.htm","_blank");
}

//简体中文、繁体中文、english链接
function gb_big5_en()
{
document.write('<table width="340" border="0" cellspacing="0" cellpadding="0">')
document.write('<tr>')
document.write('<td width="22"><img src="'+myurl+'images/index_20.gif" width="22" height="30" alt=""></td>')
document.write('<td width="60">设为首页</td>')
document.write('<td width="22"><img src="'+myurl+'images/index_20.gif" width="22" height="30" alt=""></td>')
document.write('<td width="60">简体中文</td>')
document.write('<td width="22"><img src="'+myurl+'images/index_20.gif" width="22" height="30" alt=""></td>')
document.write('<td width="60">繁体中文</td>')
document.write('<td width="22"><img src="'+myurl+'images/index_20.gif" width="22" height="30" alt=""></td>')
document.write('<td width="72">English</td>')
document.write('</tr>')
document.write('</table>')
}



function banner(whoindex)//bannerflash
{
	document.write("<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr>");
	if(whoindex=="index"){
		document.write("<td width=\"101\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_02.jpg\" width=\"101\" height=\"33\" alt=\"\"></td>");
		document.write("<td width=\"96\"><a href=\"/sofpro/cms/previewjspfile/eduhuangjiang/cms_0000000000000000050_tpl.jsp?requestCode=55\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_03.jpg\" width=\"96\" height=\"33\" alt=\"\" border=\"0\"></a></td>");
		document.write("<td width=\"96\"><a href=\"/sofpro/gecs/bbs/index.jsp\" target=\"_blank\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_04.jpg\" width=\"96\" height=\"33\" alt=\"\" border=\"0\"></a></td>");
	}else if(whoindex=="service"){
		document.write("<td width=\"101\"><a href=\"/sofpro/cms/previewjspfile/eduhuangjiang/cms_0000000000000000028_tpl.jsp?requestCode=9\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_62.jpg\" width=\"101\" height=\"33\" alt=\"\" border=\"0\"></a></td>");
		document.write("<td width=\"96\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_60.jpg\" width=\"96\" height=\"33\" alt=\"\"></td>");
		document.write("<td width=\"96\"><a href=\"/sofpro/gecs/bbs/index.jsp\" target=\"_blank\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_04.jpg\" width=\"96\" height=\"33\" alt=\"\" border=\"0\"></a></td>");
	}else{
		document.write("<td width=\"101\"><a href=\"/sofpro/cms/previewjspfile/eduhuangjiang/cms_0000000000000000028_tpl.jsp?requestCode=9\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_62.jpg\" width=\"101\" height=\"33\" alt=\"\" border=\"0\"></a></td>");
		document.write("<td width=\"96\"><a href=\"/sofpro/cms/previewjspfile/eduhuangjiang/cms_0000000000000000050_tpl.jsp?requestCode=55\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_03.jpg\" width=\"96\" height=\"33\" alt=\"\" border=\"0\"></a></td>");
		document.write("<td width=\"96\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_61.jpg\" width=\"96\" height=\"33\" alt=\"\"></td>");
	}
	document.write("<td>&nbsp;</td>");
	document.write("<td width=\"73\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_06.jpg\" width=\"73\" height=\"33\" alt=\"\"></td>");
	document.write("<td width=\"98\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_07.jpg\" width=\"98\" height=\"33\" alt=\"\"></td>");
	document.write("<td width=\"99\"><img src=\"/publicfiles/model/htmltemplate/eduhuangjiang/images/edu_index_08.jpg\" width=\"99\" height=\"33\" alt=\"\"></td>");
	document.write("</tr>");
	document.write("</table>");
}

function setlinkstyle()
{
	//window.alert(document.all.headnavtb.children.length);
	for(i=0;i<document.all.headnavtb.children.length;i++){
		if(document.all.headnavtb.children(i)!=null){
			document.all.headnavtb.children(i).style.color="#FFFFFF";
		}
	}
}

function checkJsywz()
{
   if (document.fjsy.xm.value=="")
   {
      alert("驾驶员交通违法查询:\n姓名不能为空!");
	  document.fjsy.xm.focus();
	  return  false  ;
	}
	
   if (document.fjsy.xm.value.length < 2 || document.fjsy.xm.value.length > 5)
   {
      alert("驾驶员交通违法查询:\n姓名必须为2～5位!");
	  document.fjsy.xm.focus();
	  return  false  ;
	}
	
	if (document.fjsy.hpzl.value=="")
   {
      alert("驾驶员交通违法查询:\n号牌种类不能为空!");
	  document.fjsy.hpzl.focus();
	  return  false ;
	}

	document.fjsy.target="_blank";
	document.fjsy.action="http://www.fsga.gov.cn/model/jj/jsywzcx_rs.jsp";
	document.fjsy.submit();
}

function checkJdcwz()
{
   if (document.fjdc.hphm.value=="")
   {
      alert("机动车交通违法查询:\n车牌号码不能为空!");
	  document.fjdc.hphm.focus();
	  return  false  ;
	}
	
   if (document.fjdc.hphm.value.length < 6)
   {
      alert("机动车交通违法查询:\n车牌号码格式错误!");
	  document.fjdc.hphm.focus();
	  return  false  ;
	}
	
	if (document.fjdc.hpzl.value=="")
   {
      alert("机动车交通违法查询:\n号牌种类不能为空!");
	  document.fjdc.hpzl.focus();
	  return  false ;
	}
	

	document.fjdc.target="_blank";
	document.fjdc.action="http://www.fsga.gov.cn/model/jj/jdcwzcx_rs.jsp";
	document.fjdc.submit();
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name;

	 if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='电脑编号 must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='电脑编号必须是数字.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='电脑编号必须在'+min+' 和 '+max+'之间.\n';
    } } } else if (test.charAt(0) == 'R') errors += '电脑编号必须输入.\n'; }
  } if (errors) alert('提醒:\n'+errors);
  document.MM_returnValue = (errors == '');
}