﻿if (top.location !== self.location) {top.location=self.location;}

function username()
{ 
oget('user_action','ac=username');
}

function logout()
{ 
oget('user_action','ac=logout');
}

function s_s(){
if (document.form2.q.value=="") return false
}

function footer(oit) {
//GE("bottomText").innerHTML = "电子邮箱：yoyotoservice@gmail.com <a href='http://www.miibeian.gov.cn' target='_blank'>津ICP备06000150</a>";
if ((window.location.href.length<23)&&(oit==1)){window.open('http://www.bjkw.gov.cn/html/kepu/index/index.html','new','status=no,scrollbars=yes,resizable=yes,top=100,left=100,width=300,height=300');}
//GE('headeread').innerHTML='<a href="/topic/100190.html">喜欢 YoYoTo 吗？为它起个中文名字！</a>'

//document.getElementById("headeread").innerHTML="<b style='font-size:14px'><b>";
//if (theWidth<800){
//if (document.getElementById("info"))document.getElementById("info").style.width=theWidth*0.75*0.94-100-250+'px';
//if (document.getElementById("thumbs"))document.getElementById("thumbs").style.width=75+'px';
//}
}

function GE(a){return document.getElementById(a);}

function InitRequest()
{
	var C_req = null;
	try
	{
		C_req = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			C_req = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(oc)
		{
			C_req = null;
		}
	}
	if (!C_req && typeof XMLHttpRequest != "undefined")
	{
		try
		{
			C_req = new XMLHttpRequest();
		}
		catch(fa)
		{
			alert("对不起您的浏览器不支持该功能请使用Internet Explorer 6.0或FireFox浏览器");
			C_req = null;
		}
	}
	return C_req;
}

function oget(url, data)
{
	var AjaxRequestObj = InitRequest();
	if (AjaxRequestObj != null)
	{
		var number ="";
		number=Math.random();
		AjaxRequestObj.onreadystatechange = function ()
		{
			if (AjaxRequestObj.readyState == 4 && AjaxRequestObj.responseText)
			{
				eval(AjaxRequestObj.responseText);
			}
		};
		AjaxRequestObj.open("POST","/"+url, true);
		AjaxRequestObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        AjaxRequestObj.send(data+'&number='+number);
	}
}

function opost(url, data)
{
	var AjaxRequestObj = InitRequest();
	if (AjaxRequestObj != null)
	{
		var number ="";
		number=Math.random();
		AjaxRequestObj.open("GET","/"+url+"?"+data+"&number="+number, true);
		AjaxRequestObj.onreadystatechange = function ()
		{
			if (AjaxRequestObj.readyState == 4 && AjaxRequestObj.responseText)
			{
				eval(AjaxRequestObj.responseText);
			}
		}
		AjaxRequestObj.send(null); 
	}
}