function od( aobj , type)
{
try
{
var width = 460;
var height = 400;
var left = ( screen.width - width ) / 2;
var top = ( screen.height - height ) / 2;
var href = aobj.href;
if(type == 1){
 width = 550;
 height = 288;
}
var param = 'resizable=0, width=' + width + ', height=' + height + ', left=' + left + '; top=' + top;
if(type == 2) param += ',scrollbars=1';
else param += ',scrollbars=0';
window.open( href, '_blank', param );
}
catch( e )
{
;
}
return false;
}
function tc( form ,type )
{
 form.mimetype[type].checked = true;
}
function DoInitial(selclass)
{
	document.FormSearch.SelCondition.selectedIndex=0;
	document.FormSearch.SelClass.selectedIndex=0;
        if (selclass!="") {
        var ListClass=document.FormSearch.SelClass;
        var ListCondition=document.FormSearch.SelCondition;
        var ListConditionLength= ListCondition.options.length;
        var newOption=document.createElement("OPTION");
        switch (selclass)
        {
                case "game":
                        ListClass.selectedIndex=1;
                        for (i=ListConditionLength;i>0;i--)
                                ListCondition.remove(i);
                        newOption.text="主题";
                        newOption.value="title";
                        ListCondition.add(newOption);
                        newOption=document.createElement("OPTION");
                        newOption.text="简介";
                        newOption.value="intro";
                        ListCondition.add(newOption);
                        break;
                case "mtv":
                        ListClass.selectedIndex=2; 
                        for (i=ListConditionLength;i>0;i--)
                        ListCondition.remove(i);
                        newOption.text="主题";
                        newOption.value="title";
                        ListCondition.add(newOption);
                        newOption=document.createElement("OPTION");
                        newOption.text="歌手";
                        newOption.value="singer";
                        ListCondition.add(newOption);
                        break;
                case "card":
                       ListClass.selectedIndex=4;
                        for (i=ListConditionLength;i>0;i--)
                                ListCondition.remove(i);
                        newOption.text="主题";
                        newOption.value="title";
                        ListCondition.add(newOption);
                        newOption=document.createElement("OPTION");
                        newOption.text="贺卡分类";
                        newOption.value="cardtype";
                        ListCondition.add(newOption);
                        break;
                case "joke":
                        ListClass.selectedIndex=3; 
                        for (i=ListConditionLength;i>0;i--)
                                ListCondition.remove(i);
                        newOption.text="主题";
                        newOption.value="title";
                        ListCondition.add(newOption);
                        break;
                case "ring":
                        ListClass.selectedIndex=3;
                        for (i=ListConditionLength;i>0;i--)
                                ListCondition.remove(i);
                        newOption.text="手机铃声";
                        newOption.value="title";
                        ListCondition.add(newOption);
                        break;
                default:
                        break;
        }  
	}
}
function DoCheck(thisForm)
{
	if (thisForm.SelClass.selectedIndex==0)
	{
		alert("您没有选择搜索哪一类！");
		thisForm.SelClass.focus();
		return (false);
	}
	if (thisForm.InputKeyword.value==""||thisForm.InputKeyword.value=="输入想查询的关键字")
	{
		alert("您没有填写要搜索的关键字！");
		thisForm.InputKeyword.focus();
		return (false);
	}
var ListClass=document.FormSearch.SelClass;
if (ListClass.options[ListClass.selectedIndex].value == "ring") {
  window.open( "http://mms.3bu.com/musicSingleRing2.do?webownerId=12021&serviceId=100001&songname="+thisForm.InputKeyword.value, '_blank', "toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes,location=yes, width=800, height=600 left=0, top=0");
  return (false);
}

}

function uncompile(code)
{
code=unescape(code);
var c=String.fromCharCode(code.charCodeAt(0)-code.length);
for(var i=1;i<code.length;i++){
c+=String.fromCharCode(code.charCodeAt(i)-c.charCodeAt(i-1));
}
return c;
}

function DoChange()
{
	var ListClass=document.FormSearch.SelClass;
	var ListCondition=document.FormSearch.SelCondition;
	var ListConditionLength= ListCondition.options.length;
	var newOption=document.createElement("OPTION");
	switch (ListClass.options[ListClass.selectedIndex].value)
	{
		case "game":
			for (i=ListConditionLength;i>0;i--)
				ListCondition.remove(i);
			newOption.text="主题";
			newOption.value="title";
			ListCondition.add(newOption);
			newOption=document.createElement("OPTION");
			newOption.text="简介";
			newOption.value="intro";
			ListCondition.add(newOption);
			break;
		case "mtv":
			for (i=ListConditionLength;i>0;i--)
				ListCondition.remove(i);
			newOption.text="主题";
			newOption.value="title";
			ListCondition.add(newOption);
			newOption=document.createElement("OPTION");
			newOption.text="歌手";
			newOption.value="singer";
			ListCondition.add(newOption);
			break;
		case "card":
			for (i=ListConditionLength;i>0;i--)
				ListCondition.remove(i);
			newOption.text="主题";
			newOption.value="title";
			ListCondition.add(newOption);
			newOption=document.createElement("OPTION");
			newOption.text="贺卡分类";
			newOption.value="cardtype";
			ListCondition.add(newOption);
			break;
		case "joke":
			for (i=ListConditionLength;i>0;i--)
				ListCondition.remove(i);
			newOption.text="主题";
			newOption.value="title";
			ListCondition.add(newOption);
			break;
                case "ring":
                        for (i=ListConditionLength;i>0;i--)
                                ListCondition.remove(i);
                        newOption.text="关键字";
                        newOption.value="title";
                        ListCondition.add(newOption);
                        break;
		default:
			break;
	}
}


	var delta=0.15
	var collection;
	function floaters() {
		this.items	= [];
		this.addItem	= function(id,x,y,content)
				  {
					document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');

					var newItem				= {};
					newItem.object			= document.getElementById(id);
					newItem.x				= x;
					newItem.y				= y;

					this.items[this.items.length]		= newItem;
				  }
		this.play	= function()
				  {
					collection				= this.items
					setInterval('play()',10);
				  }
		}
		function play()
		{

			for(var i=0;i<collection.length;i++)
			{
				var followObj		= collection[i].object;
				var followObj_x		= (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
				var followObj_y		= (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);

				if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
					var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
					dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
					followObj.style.left=followObj.offsetLeft+dx;
					}

				if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
					var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
					dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
					followObj.style.top=followObj.offsetTop+dy;
					}
				followObj.style.display	= '';
			}
		}
function FullPlay(Start){
    document.getElementById('flashplaymain').innerHTML ="<font color='#333333'>已经打开 全屏播放<BR/><BR/>如果播放窗口没有弹出<BR/>检查下是否浏览器是否打开了广告拦截功能</font>";
     document.getElementById('flashplayctl').innerHTML =""; 
    window.open('http://www.xuanxuan.com/tool/full.html?'+Start+'','xuanxuan_com','fullscreen');
}
function showad() {
   var adurl=new Array();
   var adwidth=new Array();
   var adheight=new Array();
   var adid=new Array();

   adurl[0]="http://mmscode1.3bu.com/mmscode/bigbanner/06251031571749493500.htm?id=06251031571749493500&webownerId=12021&childid=10000";
   adwidth[0]=760;
   adheight[0]=60;
   adid[0]="cx1";

   adurl[1]="http://www.aiqianming.cn/code/07231107099061006327.htm?id=07231107099061006327&webownerId=12021&childid=10000";
   adwidth[1]=760;
   adheight[1]=60;
   adid[1]="cx2";
  
   adurl[2]="http://mmscode1.3bu.com/mmscode/bigbanner/01181445396764825837.htm?id=01181445396764825837&serviceId=100001&webownerId=12021";
   adwidth[2]=760;
   adheight[2]=60;
   adid[2]="cx3";

   adurl[3]="http://mmscode1.3bu.com/mmscode/bigbanner/12181403074817444300.htm?id=12181403074817444300&serviceId=100001&webownerId=12021";
   adwidth[3]=760;
   adheight[3]=60;
   adid[3]="cx4";

   var adcount=4; //广告条数
   var whichad=Math.ceil(Math.random()*adcount-1);
   var playadurl=adurl[whichad];
   var playid=adid[whichad];
   document.write("<iframe id="+playid +" src=\""+playadurl+"\" name="+playid+" marginwidth=0 marginheight=0 scrolling=no border=0 frameborder=0 " 
   + " width="+adwidth[whichad]+" height="+adheight[whichad]+"></iframe>");
}


function showad_home() {
   var adurl=new Array();
   var adwidth=new Array();
   var adheight=new Array();
   var adid=new Array();

   adurl[0]="http://51.t2click.com/?ad_file=20070514_51_760x80.swf&user_id=66416&adfbid=3936&width=760&height=80&adtid=67096";
   adwidth[0]=760;
   adheight[0]=80;
   adid[0]="51";
   
   adurl[1]="http://ebaycpc.t2click.com/?ad_file=homepage_search_20070330_760x90.swf&user_id=66416&adfbid=3593&width=760&height=90&adtid=67096&";
   adwidth[1]=760;
   adheight[1]=90;
   adid[1]="ebay";


   var adcount=2; //广告条数
   var whichad=Math.ceil(Math.random()*adcount-1);
   var playadurl=adurl[whichad];
   var playid=adid[whichad];
   document.write("<iframe id="+playid +" src=\""+playadurl+"\" name="+playid+" marginwidth=0 marginheight=0 scrolling=no border=0 frameborder=0 " 
   + " width="+adwidth[whichad]+" height="+adheight[whichad]+"></iframe>");
}


function showad2() {
   var adurl=new Array();
   var adwidth=new Array();
   var adheight=new Array();
   var adid=new Array();

   adurl[0]="http://mmscode1.3bu.com/mmscode/bigbanner/07171516172827601679.htm?id=07171516172827601679&webownerId=12021&childid=10000";
   adwidth[0]=760;
   adheight[0]=80;
   adid[0]="cx1";

   adurl[1]="http://mmscode1.3bu.com/mmscode/bigbanner/06271315021925301398.htm?id=06271315021925301398&webownerId=12021&childid=10000";
   adwidth[1]=760;
   adheight[1]=90;
   adid[1]="cx2";
  
   adurl[2]="http://mmscode1.3bu.com/mmscode/bigbanner/07171516172827601679.htm?id=07171516172827601679&webownerId=12021&childid=10000";
   adwidth[2]=760;
   adheight[2]=80;
   adid[2]="cx3";

   adurl[3]="http://mmscode1.3bu.com/mmscode/bigbanner/04091201582452159760.htm?id=04091201582452159760&webownerId=12021&childid=10000";
   adwidth[3]=760;
   adheight[3]=110;
   adid[3]="cx4";

   var adcount=4; //广告条数
   var whichad=Math.ceil(Math.random()*adcount-1);
   var playadurl=adurl[whichad];
   var playid=adid[whichad];
   document.write("<iframe id=ad_2"+whichad +" src=\""+playadurl+"\" name="+playid+" marginwidth=0 marginheight=0 scrolling=no border=0 frameborder=0 " 
   + " width="+adwidth[whichad]+" height="+adheight[whichad]+"></iframe>");
}

 function ad_word() {  
   var adword=new Array();
   var adurl=new Array();
   var adcount=4; //广告条数

   adword[0]="看你射的准不准，牛人必进！";
   adurl[0]="http://u3.11265.com/productapi/game/769x600/769x600.asp?spid=8522888";
   adword[1]="笔记本，数码相机，打中就送！";
   adurl[1]="http://u3.11265.com/productapi/game/769x600/769x600.asp?spid=8522888";
   adword[2]="一块钱一个手机，进来就送！";
   adurl[2]="http://u3.11265.com/productapi/game/769x600/769x600.asp?spid=8522888";
   adword[3]="免费玩flash小游戏赢万元大奖";
   adurl[3]="http://u3.11265.com/productapi/game/769x600/769x600.asp?spid=8522888";
   
   var whichad=Math.ceil(Math.random()*adcount-1);
   document.write("<a href=\""+adurl[whichad]+"\" target=_blank> <font color=red>"+adword[whichad]+"</font></a>");
 }


function FullGamePlay(on,id) {
//playwin = window.open('http://www.xuanxuan.com/tool/play/'+id,'gameplay', 'height='+window.screen.height+', width='+window.screen.width+', top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=yes, status=no');
playwin = window.open('/tool/play/'+id,'gameplay', 'fullscreen');
playwin.document.write("<html>");
playwin.document.write("<head>");
playwin.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">");
playwin.document.write("<title>萱萱休闲吧----http://www.xuanxuan.com</title>");
playwin.document.write("<style>");
playwin.document.write("a:link,a:visited {text-decoration: none}");
playwin.document.write("a:hover {color:red}");
playwin.document.write("</style>");
playwin.document.write("</head>");
playwin.document.write("<body bgcolor=\"#000000\" leftmargin=\"0\" topmargin=\"0\" bottommargin=\"0\" scroll=\"no\" oncontextmenu=\"return false\" ondragstart=\"return false\" onselectstart =\"return false\" onselect=\"document.selection.empty()\" oncopy=\"document.selection.empty()\" onbeforecopy=\"return false\" onmouseup=\"document.selection.empty()\">");
playwin.document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
playwin.document.write("<tr>");
playwin.document.write("<td width=50%>");
playwin.document.write("<font color=\"#FFFFFF\" size=\"-1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><b> 　<a href=\"http://www.xuanxuan.com\" target=_blank><font color=\"#79E80B\">xuan</font><font color=\"#439AFA\">xuan</font><font color=white>.com</font></b></font></a></td>");
playwin.document.write("<td align=\"right\" width=50%>");
playwin.document.write("<font color=\"#FFFFFF\" size=\"-1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><b><font color=\"#A2A2A2\">close&nbsp;window&nbsp;-->&nbsp;</font></b></font><font color=\"#A2A2A2\"><a href=\"javascript:window.close();\"><img alt=\"关闭本页面\" align=\"absMiddle\" border=\"0\" src=\"/images/close.gif\" width=\"14\" height=\"14\"></a>&nbsp;</font></td>");
playwin.document.write("</tr>");
playwin.document.write("</table>");
playwin.document.write("<OBJECT ID='flashgame' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width=100% height=100%>\n");
playwin.document.write("<PARAM NAME='movie'  VALUE='" + on +  "'>\n");
playwin.document.write("<PARAM NAME=quality VALUE=high>\n");
playwin.document.write("<embed src='"+ on + "' quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width=100% height=100%></embed></object>");
playwin.document.write ("</OBJECT>\n");
playwin.document.write("</body>");
playwin.document.write("</html>");
playwin.focus();
}


