﻿
function doZoom(size)
{$('divPrint').style.fontSize=size+'px';}
function doPrint(color)
{var str="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\" ><head>";var article;var css;var strAdBegin="<!---->";var strAdEnd="<!--NEWSZW_HZH_END-->";var strFontSize='【<A href="javascript:doZoom(16)">大</A> <A href="javascript:doZoom(14)">中</A> <A href="javascript:doZoom(12)">小</A>】';var strdoPrint="doPrint()";var strTmp;css="<style>"
+"body{font-family:宋体;background-color: #ffffff;LINE-HEIGHT: 125%;color:black}"
+"td,.f12{font-size:13px; BORDER-RIGHT: 0px; BORDER-TOP: 0px; }"
+"TABLE { BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px;  }"
+".f24 {font-size:24px;}"
+"table.naming2 td{ border-style:solid; BORDER-COLOR: #CBDCED; color:black;}"
+".f14 {font-size:14px;}"
+".title14 {font-size:14px;line-height:130%}"
+".l17 {line-height:170%;}"
+"</style>"
+"<style media=print>"
+".NoPrint{display:none;}"
+".PageNext{page-break-after: always;}"
+".PageHeader{display:page-header-group;}"
+".PageFooter{display:page-footer-group;}"
+"</style>";str+=css;str+='<meta http-equiv="content-type" content="text/html; charset=gb2312">';str+='<title>'+window.parent.document.title+'</title></head>';str+='<link href="'+AppPath+'App_Themes/Default/StyleSheet.css" type="text/css" rel="stylesheet" />';str+="<body bgcolor=#ffffff style='bgcolor:white;background:white' topmargin=5 leftmargin=5 marginheight=5 marginwidth=5 onLoad='window.print()'>";str+="<center><table class='NoPrint' width=600 border=0 bgcolor='#ffffff' cellspacing=0 cellpadding=0><tr><td height=34 width=350>"
+"&nbsp;快速导航:<a href='"+AppPath+"Default.aspx'>网站首页</a>§<a href='"+AppPath+"Naming/Default.aspx'>起名在线</a>"
+"</td><td align=right valign=bottom>【<a href='javascript:history.back(-1)'>返回</a>】【<a href='javascript:window.print();'>打印</a>】【<A target=\"_blank\" title=\"配置打印\" href='"+AppPath+"Tool/print.reg'>配置</A>】【<a href='javascript:window.close()'>关闭</a>】&nbsp;</td></tr></table>";var header="<table border='0' width='100%' cellpadding='0' cellspacing='0'><tr><td align='center'><img src='"+AppPath+"Images/Logos/Logo-naming-small.gif' border='0' alt='美名腾－起名' /><hr /></td></tr></table>";try
{$("printHeader1").innerHTML=header;$("printHeader2").innerHTML=header;article=$('divPrint').innerHTML;article=article.replace(/\<TBODY\>/g,"");article=article.replace(/\<\/TBODY\>/g,"");str+=article;str+="</center>";str+="</body></html>";if(color)
{str=str.replace(/color=(|")red(|")/gi,"style='border-bottom:1px solid black'");str=str.replace(/color=(|")green(|")/gi,"style='border-bottom:1px solid black'");str=str.replace(/color:[ ]*red/gi,"border-bottom:1px solid black;");str=str.replace(/color:[ ]*green/gi,"border-bottom:1px solid black;");str=str+"<script language='javascript'>"
+"window.onload = function ()"
+"    {"
+"        var tds = document.getElementsByTagName(\"TD\");"
+"        for(i=0; i < tds.length; ++i)"
+"        {"
+"            tds[i].style.color = \"#000000\";"
+"        }"
+"        var spans = document.getElementsByTagName('SPAN');"
+"        for(i=0; i < spans.length; ++i)"
+"        {"
+"            if(spans[i].innerHTML == '五格' || spans[i].innerHTML == '五行' || spans[i].innerHTML == '属相')"
+"            {"
+"                 spans[i].style.borderBottomWidth = '0px';"
+"            }"
+"        }"
+"    }"
+"<\/script>";}
window.parent.document.clear();window.parent.document.write(str);window.parent.document.close();}
catch(e)
{}}
function Transform_GetOffset_SubstractScroll(e)
{try
{var origin=e;var t=e.offsetTop;var l=e.offsetLeft;while(e=e.offsetParent)
{t+=e.offsetTop-(e.tagName!="BODY"&&e.tagName!="HTML"?e.scrollTop:0);l+=e.offsetLeft-(e.tagName!="BODY"&&e.tagName!="HTML"?e.scrollLeft:0);}
if(!document.all&&origin)
{while(origin=origin.parentNode)
{if(origin.id)
{break;}}
if(origin)
{t-=origin.scrollTop;l-=origin.scrollLeft;}}
var rec=new Array(1);rec[0]=t;rec[1]=l;return rec;}
catch(e)
{alert(e);}}
try
{var oldBodyClickFunction=document.body.onclick;document.body.onclick=function(event)
{try
{if(oldBodyClickFunction!=undefined)
{oldBodyClickFunction(event);}}
catch(e)
{}
if(!event)
{event=window.event;}
var isMSIE=(navigator.appName=="Microsoft Internet Explorer");try
{if(isMSIE)
{if(event.srcElement.id!=ShowNameClientIDs.txtDetails&&event.srcElement.id!='spanDetailsTitle'&&event.srcElement.id!='divDetailsDialog'&&event.srcElement.id.indexOf("divtd")==-1)
{$('divDetailsDialog').style.display="none";}}
else
{if(event.target.id!=ShowNameClientIDs.txtDetails&&event.target.id!='spanDetailsTitle'&&event.target.id!='divDetailsDialog'&&event.target.id.indexOf("divtd")==-1)
{$('divDetailsDialog').style.display="none";}}}
catch(e){}}}
catch(e)
{}
function ShowDetailedDialog(title,details,anchorPosition,evt)
{try
{if(!evt&&window.event)
{evt=window.event;}
title=unescape(title);details=unescape(details);var rec=Transform_GetOffset_SubstractScroll($(anchorPosition));if(rec!=null&&rec!=undefined&&rec[0]!=null&&rec[0]!="")
{if(typeof(IsBaiduApp)=="undefined"||!IsBaiduApp)
{$("divDetailsDialog").style.left=(rec[1]).toString()+"px";}
else
{$("divDetailsDialog").style.left="10px";}
$("divDetailsDialog").style.top=(rec[0]-80).toString()+"px";}
$(ShowNameClientIDs.txtDetails).value=details;$("spanDetailsTitle").innerHTML=title+"：";$("divDetailsDialog").style.display="";if(document.all)
{event.cancelBubble=true;event.returnValue=false;return false;}
else
{if(evt.stopPropagation)
{evt.stopPropagation();}}}
catch(e)
{}}
function WriteCopyright()
{document.writeln("<span style='color:gray'>此分析由 </span><a style='color:gray' href='http://www.meimingteng.com'>美名腾智能起名</a>(www.meimingteng.com)提供&nbsp;&nbsp;");}
function ShowCategoryCouplet(category)
{var pid="p"+category;for(var i=1;i<6;++i)
{var tempid="p"+i;if(tempid!=pid)
{$(tempid).style.background="#fff";}
else
{$(pid).style.background="url("+AppPath+"Images/tab_bkgd.gif) repeat-x 50% bottom";}}
var cid="c"+category;for(var i=1;i<5;++i)
{var tempid="c"+i;if(tempid!=cid&&category!='5')
{$(tempid).style.display="none";}
else
{$(tempid).style.display="";var prefix="<font style='color:#000000'>("+GetCategoryName(i)+")</font><br>";if(category=='5')
{var html=$(tempid).innerHTML;if(html.indexOf("("+GetCategoryName(i)+")")==-1)
{html=prefix+html;}
$(tempid).innerHTML=html;}
else
{var html=$(tempid).innerHTML;if(html.indexOf("("+GetCategoryName(i)+")")!=-1)
{html=html.substring(html.indexOf(GetCategoryName(i))+12+GetCategoryName(i).length);}
$(tempid).innerHTML=html;}}}}
function GetCategoryName(category)
{if(category=='1')
{return"文韬武略";}
else if(category=='2')
{return"志高行洁";}
else if(category=='3')
{return"吉祥如意";}
else if(category=='4')
{return"官运仕途";}}
function AddIdiomCouplet()
{var spanPrefix=IdiomCoupletSpanIDPrefix;var cbPrefix=IdiomCoupletCheckboxIDPrefix;var summSpan=$("summaryIdiom");var sels=document.getElementsByTagName("INPUT");var newValue="";for(i=0;i<sels.length;++i)
{if(sels[i].type.toLowerCase()=="radio"&&sels[i].checked&&sels[i].id.indexOf(cbPrefix)!=-1)
{var tempID=sels[i].id.replace(cbPrefix,"");tempID=spanPrefix+tempID;newValue=$(tempID).innerHTML;}}
summSpan.style.fontWeight="bold";summSpan.innerHTML=newValue;setTimeout("$('summaryIdiom').style.fontWeight = ''",1000);}
function PlayVoice(name,xing)
{var url=AppPath+'Naming/PlayVoice.aspx?n='+escape(name)+"&x="+escape(xing);if(document.all)
{$("MediaPlayer").URL=url;}
else
{$("real").SetSource(url);$("real").DoPlay();}}
function OnVoteQWZT(id,lbid,checkCode,mingWords)
{try
{var theTitle=$(lbid).title;$("spanMeaningSentence").title=theTitle;if(theTitle!=""&&theTitle!="美言妙句")
{$("spanMeaningSentence").innerHTML="该名字可以趣解为：“"+$(lbid).innerHTML+"（"+theTitle+"）”。";}
else
{$("spanMeaningSentence").innerHTML="该名字可以趣解为：“"+$(lbid).innerHTML+"”。";}
xmlHttp=GetXmlHttpObject();SynSendXmlHttpRequest(xmlHttp,AppPath+"Naming/AJAXServices/VoteForQWZT.aspx?id="+escape(id.toString())+"&cc="+escape(checkCode.toString())+"&g="+escape(Gender));SetCookie(escape(mingWords),$("spanMeaningSentence").innerHTML);$("spanMeaningSentence").style.fontWeight="bold";setTimeout("$('spanMeaningSentence').style.fontWeight = ''",1000);}
catch(e)
{}}
function OnSealFontChanged(fontID,name)
{var url="";var stype=(typeof(IsBaiduApp)=="undefined"||!IsBaiduApp)?$("sealType"):$("sealType01");var sfont=(typeof(IsBaiduApp)=="undefined"||!IsBaiduApp)?$("sealFont"):$("sealFont01");var simg=(typeof(IsBaiduApp)=="undefined"||!IsBaiduApp)?$("sealImg"):$("sealImg01");var type=stype.selectedIndex;if(fontID!=-1)
{url=AppPath+"Naming/GenerateSeal.aspx?fid="+fontID+"&name="+name+"&type="+(type==0?1:2);}
else
{var tempSel=sfont;var temp=tempSel.options[tempSel.selectedIndex].value;url=fontID=AppPath+"Naming/GenerateSeal.aspx?fid="+temp+"&name="+name+"&type="+(type==0?1:2);}
simg.src=url;}
