// JavaScript Document
function mouseover(obj)
{
	obj.className="b3";
}
function mouseout(obj)
{
	obj.className="b1";
}
function secMouseover(obj)
{
	obj.className="s3";
}
function secMouseout(obj)
{
	obj.className="s1";
}
function showSpArea()
{
	$("sp_sorts").style.display="block";
}
function hiddenSpArea()
{
	$("sp_sorts").style.display="none";
}
function js_over(obj)
{

 document.getElementById(""+obj+"").style.border="1px solid #a1c9ef"
}
function js_out(obj)
{

 document.getElementById(""+obj+"").style.border="1px solid #ebe4d1"
}
function addFav(url,name)
{

	window.external.AddFavorite("http://"+url,name);	
}
function setHomePage(obj,url)
{
	obj.style.behavior="url(#default#homepage)";
	obj.setHomePage(url);	
}
function write_info()
{
 $("info_txt").value=""
}
function confir()
{
  if( $("info_txt").value=="")
  {
   $("info_txt").value="留言内容"
  }
}
function tj()
{
 if(!regempty($("txt_name").value))
 {
   alert("请填写姓名！")
   $("txt_name").focus();
 }
 else if(!regempty($("txt_phone").value))
 {
  alert("请填写联系电话！")
  $("txt_phone").focus();
 }
 else if(!regempty($("txt_email").value))
 {
		alert("请填写你的E-mail！")
		$("txt_email").focus();
 }
 else if(formatemail($("txt_email").value)==false)
 {
		alert("你的E-mail格式有误！")
		$("txt_email").focus();
 }
  else if(!regempty($("info_txt").value))
 {
  alert("请填写留言内容！")
  $("info_txt").focus();
 }
  else if($("info_txt").value=="留言内容")
 {
  alert("请填写留言内容！")
  $("info_txt").focus();
 }
 else
 {
	var http=new ajax();
	var id=$("job_id").value
	thename=$("txt_name").value
	phone=$("txt_phone").value;
	email=$("txt_email").value;
	content=$("info_txt").value;
	alert(id)
	http.onreadystatechange=function()
	{
		if(ajax_returnresponse(http))
		{
		　alert("提交成功！")
		  $("txt_name").value="";
		  $("txt_phone").value="";
		  $("txt_email").value="";
		  $("info_txt").value="留言内容";
		}
	}
	http.open("POST","/process.asp",true);
	http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	http.send("action=jobtj_info&id="+id+"&name="+escape(thename)+"&phone="+escape(phone)+"&email="+escape(email)+"&content="+escape(content));
 }
}
function re_write()
{
  $("txt_name").value=""
  $("txt_phone").value=""
  $("txt_email").value=""
  $("info_txt").value="留言内容"
}

function get_info(id)
{
	var id=id;
	var http=new ajax();
	http.onreadystatechange=function()
	{
		if(ajax_returnresponse(http))
		{
		$("zp_title").innerHTML=http.responseText
		}
	}
	http.open("POST","/process.asp",true);
	http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	http.send("action=job_info&id="+id);
}