
//window.defaultStatus="如果您喜欢本站，别忘了把本站的网址告诉您QQ上的朋友哦！谢谢您的支持";

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;
}

String.prototype.getUrlArg=function(str,sDef){
	var a=this.match(new RegExp("(^|&|\\?)"+str+"=[^&]*"))
	return a==null||str==""?(sDef||""):a[0].slice(str.length+2)
}
function removeSpaces(s) {
	return s.replace(/[ 　]/gi,'');
}
function strReverse(s) {
	return s.split("").reverse().join("");
}
function trim(s){
	return s.replace(/(^[ 　\t\r\n]*)|([ 　\t\r\n]*$)/g, "");
}
//<textarea name="note" onkeyup="textLimit(this,36)" onkeydown="textLimit(this,36)"></textarea>
function textLimit(t,n){
	if(t.value.length>n) t.value=t.value.substring(0,n);
}

function addFavorite(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 copyToClipboard(textit) {
	if (window.clipboardData) {
		window.clipboardData.setData("Text",textit);
	} else {
		var flashcopier = 'flashcopier';
		if(!$(flashcopier)) {
			var divholder = document.createElement('div');
			divholder.id = flashcopier;
			document.body.appendChild(divholder);
		}
		$(flashcopier).innerHTML = '';
		var divinfo = '<embed src="/common/_clipboard.swf" FlashVars="clipboard='+textit+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
		$(flashcopier).innerHTML = divinfo;
	}
	alert('网址已复制，发给好友共享本文！')
}
window.onload=function(){
	document.body.oncopy=function(){
		event.returnValue=false;
		var t=document.selection.createRange().text;
		var s="文章来自：我要起名网(www.517ming.com)\r\n";
		clipboardData.setData('Text',t+'\r\n'+s);
	}
}

//B popTip
var popTip={}
popTip.show=function(id,str){
	try{
		var p = document.createElement("div");
		document.body.appendChild(p);
		p.id = "popTip";
		p.style.position="absolute"
		p.style.zIndex=8
		var s=''
		s+='<table border="0" cellspacing="0" cellpadding="0"><tr>'
		s+='<td width="35"><img src="/common/images/tt_01.png" width="35" height="26" /></td>'
		s+='<td valign="bottom" background="/common/images/tt_02.png">'+str+'&nbsp;</td>'
		s+='<td width="28"><a href="javascript:popTip.hide()"><img src="/common/images/tt_04.png" width="28" height="26" border="0" /></a></td>'
		s+='</tr><tr>'
		s+='<td width="35"><img src="/common/images/tt_12.png" width="35" height="24" /></td>'
		s+='<td background="/common/images/tt_13.png">&nbsp;</td>'
		s+='<td width="28"><img src="/common/images/tt_14.png" width="28" height="24" /></td>'
		s+='</tr></table>'
		p.innerHTML=s

		var t=$(id);
		var ol=t.offsetLeft
		var ot=t.offsetTop
		var ow=t.clientWidth

		while(t=t.offsetParent){
			ot+=t.offsetTop;
			ol+=t.offsetLeft;
		}
		p.style.top = ot-44+"px";
		p.style.left = ol+ow-22+"px";
	}catch(e){
		alert(str)
	}
}
popTip.hide=function(){
	var p=$("popTip")
	if(p)p.parentNode.removeChild(p)
}
//E popTip

function stMenu(id,s) {
	var a=$(id),b
	if(a){
		b=a.getElementsByTagName("a")
		for(var j=0; j<b.length; j++){
			if(b[j].innerText==s){
				b[j].className="st"
				return
			}
		}
	}
}

var doc={}
doc.qq=function() {
	var s="<a target=blank href=tencent://message/?uin=#&Site=我要起名网&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:#:1 alt=点击开始会话></a>（请注明：我要起名网）"
	s=s.replace(/#/g,strReverse("968422365"))
    document.write(s)
}
doc.qqt=function () {
	var s="QQ咨询：#（请注明：我要起名网）"
	s=s.replace(/#/g,strReverse("968422365"))
    document.write(s)
}
doc.tel=function() {
	document.write(strReverse("55423423-020"))
}
doc.add=function() {
	document.write(strReverse("部总务业网运红园件软河天市州广"))
}
doc.mba=function() {
    document.write(strReverse(">a/<号10320060备PCI鲁>knalb_=tegrat /nc.vog.naiebiim.www//:ptth=ferh a<"))
}
doc.law=function() {
	document.write(strReverse("任责律法其究追将、用盗、权侵现发有如，册注请申局标商家国在已均案图及”名起要我“：明声重郑"))
}
doc.extit=function(s){
	var t=document.title
	t=t.replace("_我要起名网","")
	document.title=t+s
}
doc.retit=function(s){
	document.title=s
}
doc.foot=function(){
	var s=''
	document.write(s)
}
doc.amazon=function(){
	var s='>emarfi/<>"0"=redrobemarf "0"=thgiehnigram "0"=htdiwnigram "901"=thgieh "081"=htdiw "on"=gnillorcs "32-01=ecruos&2=k&hcraes_ossa=noitca?ppAkniLcossa/nm/nc.nozama.www//:ptth"=crs emarfi<'
	document.write(strReverse(s))
}
doc.t1=function(){
	var s=""
	var b,a=["爱情魔法，揭开您和她姓名中的秘密#18","尊贵签名，自信一生，1分钟获取艺术签名#7","制作姓名藏头诗，个性新亮点#21"]
	for(var i in a){
		b=a[i].split("#")
		s+="<a href=http://c.wauee.com/click?pid="+b[1]+"&mid=22957&channel=1 target=_blank>"+b[0]+"</a><br />"
	}
	document.write(s)
}
doc.newsFrame=function(u){
	var s=""
	s=strReverse(">emarfi/<>otua=gnillorcs 0=redrobemarf %001=thgieh %001=htdiw #=crs niam=eman emarfi<")
	s=s.replace("#",strReverse(u))
	eval(strReverse(")s(etirw.tnemucod"))
}
