//kstatus();
function kstatus(){
	self.status="【查快递CKD.CC】常用快递单号查询网，下次您只需要在浏览器输入CKD.CC即可查询快递！";
	setTimeout("kstatus()",100);
}
function $(id) {
	return document.getElementById(id);
}
function toggle_view(objname, noimg) {
	var obj = $(objname);
	obj.className = obj.className == 'des_on' ? 'des' : 'des_on';
	if(!noimg) {
		var img = $(objname + '_img');
		img.src = img.src.indexOf('_yes.gif') == -1 ? img.src.replace(/_no\.gif/, '_yes\.gif') : img.src.replace(/_yes\.gif/, '_no\.gif');
	}
}
var bookmarkname="查快递CKD.CC - 快递查询大全";
function addbookmark(title,url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}
function tianqi(){
//document.writeln("正在获取当地天气...")
document.writeln("<iframe allowTransparency=\"true\" src=\"http:\/\/m.weather.com.cn\/m\/pn4\/weather.htm \" width=\"170\" height=\"20\" marginwidth=\"0\" marginheight=\"0\" hspace=\"0\" vspace=\"0\" frameborder=\"0\" scrolling=\"no\"><\/iframe>")
}
function helloCKD(){
var myDate = new Date(); 
i = myDate.getHours();
if(i<4){document.write("<strong>Hi,注意身体,不要经常熬夜喔!</strong>")}
else if(i<=6){document.write("<strong>Hi,这么早就查快递来了!</strong>")}
else if (i<9){document.write("<strong>Hi,全新的一天!祝你开心!</strong>")}
else if (i<12){document.write("<strong>Hi,上午好!</strong>")}
else if (i<14){document.write("<strong>Hi,中午好!</strong>")}
else if (i<19){document.write("<strong>Hi,下午好!</strong>")}
else if (i<22){document.write("<strong>Hi,晚上好!</strong>")}
else {document.write("<strong>Hi,查完快递记得早点休息喔!</strong>")}
}
function clearDefault(inputField){
	if (inputField.type == "text") {
		if (inputField.value != "")
			{
			inputField.style.background='#fff';
			}
			else{
				inputField.style.background='#fff';
			}
	}
}
function putDefault(inputField){   
	if (inputField.type == "text") {
		if (inputField.value == "")
		{
		inputField.value = "";
		inputField.style.background="#fff url(/images/ckd_number_bg.gif) left center no-repeat";
		}
	}
}
function ToCDB(str) {
	var tmp = "";
	for (var i = 0; i < str.length; i++) {
		if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) {
			tmp += String.fromCharCode(str.charCodeAt(i) - 65248);
		}
		else {
			tmp += String.fromCharCode(str.charCodeAt(i));
	}
	}
	return tmp
}
//是否为数字
function isNum(str) {
    return (str.search(/^\d+(\.\d+)?$/) != -1);
}
function removeWhitespace(str) {
return str.replace(/[^0-9a-zA-Z]/g,"");
}
function query(id,name)
{
var order=document.getElementById(id).value;
	order=ToCDB(order);
	order=removeWhitespace(order);
	if(order=="")
	{
	alert("Hi,你还没有输入"+name+"单号!");
	return false;
	}
	if(/.*[\u4e00-\u9fa5]+.*$/.test(order))
	{
	window.open("http://www.tbj.cc/s.php?q="+order);
	}
	else{
	window.location.href = "http://q.ckd.cn/" + id + "-" + order + ".html";
}
return false;
}
function slot728_90()
{
document.writeln('<iframe name="tb" src="http://www.taobao.com/go/act/sale/728x90_plgx.php?pid=mm_10026656_2110444_8953627&refpos=,a,null" frameborder="0" scrolling="no" width="728" height="90" align="center"></iframe>');
}
function GetUrlParam(paramName)
{
    var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ;
    var oMatch = oRegex.exec(window.location.search) ;
    if ( oMatch && oMatch.length > 1 )
        return oMatch[1] ;
    else
        return '' ;
}
function jump()
{
var reflocation=GetUrlParam("desktop_ref");
if (reflocation.indexOf("ems.ckd.cc") > 0 || reflocation.indexOf("cha.ckd.cc")> 0 || reflocation.indexOf("chaxun.ckd.cc")> 0) {
location.href = GetUrlParam("desktop_ref");
}
else{
return false;
}
}
setTimeout("jump()", 60000);
function sckd(){
	window.location.href="/ckd/";
}
function stat(){
document.writeln("<script language=\"javascript\" type=\"text\/javascript\" src=\"http:\/\/js.users.51.la\/3095008.js\"><\/script>");
}
