$import("../js/prototype_htmlElement_pack.js","js");


function area_select(){
	if ($("area_box")) {
		$('area_box').removeNode(true);
		$("bk").style.display="none";
	}
	else
	{
		this.box0 = document.createElement('div');
		this.box0.id = 'area_box';
		document.getElementsByTagName('body')[0].appendChild(this.box0);
		this.box0.style.height = document.body.clientHeight+"px";
		
		if ($("bk")) $("bk").style.height = document.body.clientHeight + "px";
		$("bk").style.display="block";		
		startRequest("info-01.html","area_box");
	}
}

function area_select2(){
	if ($("area_box")) {
		$('area_box').removeNode(true);
		$("bk").style.display="none";
	}
	else
	{
		this.box0 = document.createElement('div');
		this.box0.id = 'area_box';
		document.getElementsByTagName('body')[0].appendChild(this.box0);
		this.box0.style.height = document.body.clientHeight+"px";

		if ($("bk")) $("bk").style.height = document.body.clientHeight + "px";
		$("bk").style.display="block";	
		startRequest("info-02.html","area_box");
	}
}

function area_select3(){
	if ($("area_box")) {
		$('area_box').removeNode(true);
		$("bk").style.display="none";
	}
	else
	{
		this.box0 = document.createElement('div');
		this.box0.id = 'area_box';
		document.getElementsByTagName('body')[0].appendChild(this.box0);
		this.box0.style.height = document.body.clientHeight+"px";
		
		if ($("bk")) $("bk").style.height = document.body.clientHeight + "px";
		$("bk").style.display="block";			
		startRequest("info-03.html","area_box");
	}
}
function area_select4(){
	if ($("area_box")) {
		$('area_box').removeNode(true);
		$("bk").style.display="none";
	}
	else
	{
		this.box0 = document.createElement('div');
		this.box0.id = 'area_box';
		document.getElementsByTagName('body')[0].appendChild(this.box0);
		this.box0.style.height = document.body.clientHeight+"px";
		
		if ($("bk")) $("bk").style.height = document.body.clientHeight + "px";
		$("bk").style.display="block";			
		startRequest("info-04.html","area_box");
	}
}



function area_select5(){
	if ($("area_box")) {
		$('area_box').removeNode(true);
		$("bk").style.display="none";
	}
	else
	{
		this.box0 = document.createElement('div');
		this.box0.id = 'area_box';
		document.getElementsByTagName('body')[0].appendChild(this.box0);
		this.box0.style.height = document.body.clientHeight+"px";
		
		if ($("bk")) $("bk").style.height = document.body.clientHeight + "px";
		$("bk").style.display="block";		
		startRequest("trade.html","area_box");
	}
}

function area_select6(){
	if ($("area_box")) {
		$('area_box').removeNode(true);
		$("bk").style.display="none";
	}
	else
	{
		this.box0 = document.createElement('div');
		this.box0.id = 'area_box';
		document.getElementsByTagName('body')[0].appendChild(this.box0);
		this.box0.style.height = document.body.clientHeight+"px";
		
		if ($("bk")) $("bk").style.height = document.body.clientHeight + "px";
		$("bk").style.display="block";			
		startRequest("info-05.html","area_box");
	}
}
function close_area_select(){
	top.$('area_box').removeNode(true);
	$("bk").style.display="none";
	}
	
	
function area_select7(){
		if ($("bk")) $("bk").style.height = document.body.clientHeight + "px";
		$("bk").style.display="block";		
		startRequest("info-01.html","area_box");
}



function recruitment_box(page_src){
	if ($("recruitment_box")) close_recruitment_box();
	this.box1 = document.createElement('div');
	this.box1.id = 'recruitment_box';
	document.getElementsByTagName('body')[0].appendChild(this.box1);

	this.box1.style.height = document.body.clientHeight+"px";
	this.box1.innerHTML = '<div id="recruitment_inner"><iframe id="recruitment_text" src='+page_src+' frameborder="0" marginheight="0" marginwidth="0" scrolling="no" allowtransparency="true" ></iframe></div>';
}
function close_recruitment_box(){
	top.$('recruitment_box').removeNode(true);
	}
	
	
	
	
	
	
	
	
	
	
	//ajax
var xmlHttp;
function createXMLHttpRequest(){if(window.ActiveXObject){xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}else if(window.XMLHttpRequest){xmlHttp = new XMLHttpRequest();}}

function startRequest(url,id){
	createXMLHttpRequest();
	try{
		xmlHttp.onreadystatechange = function() {
			handleStateChange(id);
		}
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null); 
	}
	catch(exception)
	{
		$(id).innerHTML = "您要访问的资源不存在!";
	}
}

function handleStateChange(id)
{ 
	if(xmlHttp.readyState == 4)
	{ 
		if (xmlHttp.status == 200 || xmlHttp.status == 0){

		$(id).innerHTML = xmlHttp.responseText;

		}
	}
}
//ajax end





















//id对象获取
function $() {var elements = new Array();for (var i = 0; i < arguments.length; i++) {var element = arguments[i];if (typeof element == 'string') element = document.getElementById(element);if (arguments.length == 1) return element;elements.push(element);}return elements;}


function $import(path, type){
  if (type == "css") {
      document.write("<" + "link rel=\"stylesheet\" rev=\"stylesheet\" href=\"" + path + "\" type=\"text/css\" media=\"screen\" />");
  } else {
      document.write("<" + "script src=\"" + path + "\" type=\"text/javascript\"></" + "script>");
  }
}
function killErrors() { 
return true; 
} 
//window.onerror = killErrors; 