/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.0 - Licence Number  ******                         # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000–2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

// define a few variables that are required
var vbmenu_usepopups = false;
var ignorequotechars = 0;

// #############################################################################
// lets define the browser we have instead of multiple calls throughout the file
var userAgent = navigator.userAgent.toLowerCase();
var is_opera  = (userAgent.indexOf('opera') != -1);
var is_saf    = ((userAgent.indexOf('safari') != -1) || (navigator.vendor == "Apple Computer, Inc."));
var is_webtv  = (userAgent.indexOf('webtv') != -1);
var is_ie     = ((userAgent.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv));
var is_ie4    = ((is_ie) && (userAgent.indexOf("msie 4.") != -1));
var is_moz    = ((navigator.product == 'Gecko') && (!is_saf));
var is_kon    = (userAgent.indexOf('konqueror') != -1);
var is_ns     = ((userAgent.indexOf('compatible') == -1) && (userAgent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_saf));
var is_ns4    = ((is_ns) && (parseInt(navigator.appVersion) == 4));

// catch possible bugs with WebTV and other older browsers
var is_regexp = (window.RegExp) ? true : false;

var ADM_CE = document.all?1:
(document.getElementById?0:-1);

// #############################################################################
// let's find out what DOM functions we can use
var vbDOMtype = '';
if (document.getElementById)
{
	vbDOMtype = "std";
}
else if (document.all)
{
	vbDOMtype = "ie4";
}
else if (document.layers)
{
	vbDOMtype = "ns4";
}

// make an array to store cached locations of objects called by fetch_object
var vBobjects = new Array();

// #############################################################################
// function to emulate document.getElementById
function fetch_object(idname, forcefetch)
{
	if (forcefetch || typeof(vBobjects[idname]) == "undefined")
	{
		switch (vbDOMtype)
		{
			case "std":
			{
				vBobjects[idname] = document.getElementById(idname);
			}
			break;

			case "ie4":
			{
				vBobjects[idname] = document.all[idname];
			}
			break;

			case "ns4":
			{
				vBobjects[idname] = document.layers[idname];
			}
			break;
		}
	}
	return vBobjects[idname];
}

// #############################################################################
// function to handle the different event models of different browsers
// and prevent event bubbling
function do_an_e(eventobj)
{
	if (!eventobj || is_ie)
	{
		window.event.returnValue = false;
		window.event.cancelBubble = true;
		return window.event;
	}
	else
	{
		eventobj.stopPropagation();
		eventobj.preventDefault();
		return eventobj;
	}
}

// #############################################################################
// function to open a generic window
function openWindow(url, width, height)
{
	var dimensions = "";
	if (width)
	{
		dimensions += ",width=" + width;
	}
	if (height)
	{
		dimensions += ",height=" + height;
	}
	window.open(url, "vBPopup", "statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes" + dimensions);
	return false;
}

// #############################################################################
// function to open an IM Window
function imwindow(imtype, userid, width, height)
{
	return openWindow("sendmessage.php?" + SESSIONURL + "do=im&type=" + imtype + "&userid=" + userid, width, height);
}

// #############################################################################
// function to show list of posters in a thread
function who(threadid)
{
	return openWindow("misc.php?" + SESSIONURL + "do=whoposted&threadid=" + threadid, 230, 300);
}

// #############################################################################
// function to open the reputation window
function reputation(postid)
{
	window.open("reputation.php?" + SESSIONURL + "p=" + postid, "Reputation", "toolbar=no, scrollbars=yes, resizable=yes, width=400, height=241");
	return false;
}

// #############################################################################
function manageattachments(url, width, height, hash)
{
	window.open(url, "Attach" + hash, "statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height);
	return false;
}

// #############################################################################
// function to do a single-line conditional
function iif(condition, trueval, falseval)
{
	return condition ? trueval : falseval;
}

// #############################################################################
// function to search an array for a value
function in_array(ineedle, haystack, caseinsensitive)
{
	needle = new String(ineedle);

	if (caseinsensitive)
	{
		needle = needle.toLowerCase();
		for (i in haystack)
		{
			if (haystack[i].toLowerCase() == needle)
			{
				return i;
			}
		}
	}
	else
	{
		for (i in haystack)
		{
			if (haystack[i] == needle)
			{
				return i;
			}
		}
	}
	return -1;
}

function js_toggle_all(formobj, formtype, option, exclude, setto)
{
	for (var i =0; i < formobj.elements.length; i++)
	{
		var elm = formobj.elements[i];
		if (elm.type == formtype && in_array(elm.name, exclude, false) == -1)
		{
			switch (formtype)
			{
				case "radio":
					if (elm.value == option) // option == '' evaluates true when option = 0
					{
						elm.checked = setto;
					}
				break;
				case "select-one":
					elm.selectedIndex = setto;
				break;
				default:
					elm.checked = setto;
				break;
			}
		}
	}
}

function js_select_all(formobj)
{
	exclude = new Array();
	exclude[0] = "selectall";
	js_toggle_all(formobj, "select-one", '', exclude, formobj.selectall.selectedIndex);
}

function js_check_all(formobj)
{
	exclude = new Array();
	exclude[0] = "keepattachments";
	exclude[1] = "allbox";
	exclude[2] = "removeall";
	js_toggle_all(formobj, "checkbox", '', exclude, formobj.allbox.checked);
}

function js_check_all_option(formobj, option)
{
	exclude = new Array();
	exclude[0] = "useusergroup";
	js_toggle_all(formobj, "radio", option, exclude, true);
}

function checkall(formobj) // just an alias
{
	js_check_all(formobj);
}
function checkall_option(formobj, option) // just an alias
{
	js_check_all_option(formobj, option);
}

// #############################################################################
// function to check message length before form submission
function validatemessage(messageText, subjectText, minLength, maxLength, ishtml, tForm)
{
	// bypass Safari and Konqueror browsers with Javascript problems
	if (is_kon || is_saf || is_webtv)
	{
		return true;
	}

	// attempt to get a code-stripped version of the text
	var strippedMessage = stripcode(messageText, ishtml, ignorequotechars);

	// check for completed subject
	if (subjectText.length < 1)
	{
		alert(vbphrase["must_enter_subject"]);
		return false;
	}
	// check for minimum message length
	else if (strippedMessage.length < minLength)
	{
		alert(construct_phrase(vbphrase["message_too_short"], minLength));
		return false;
	}
	// everything seems okay
	else
	{
		return true;
	}
}

// #############################################################################
// function to trim quotes and vbcode tags
function stripcode(str, ishtml, stripquotes)
{
	if (!is_regexp)
	{
		return str;
	}

	if (stripquotes)
	{
		var quote1 = new RegExp("(\\[QUOTE\\])(.*)(\\[\\/QUOTE\\])", "gi");
		var quote2 = new RegExp("(\\[QUOTE=(&quot;|\"|\\'|)(.*)\\1\\])(.*)(\\[\\/QUOTE\\])", "gi");

		while(str.match(quote1))
		{
			str = str.replace(quote1, '');
		}

		while(str.match(quote2))
		{
			str = str.replace(quote2, '');
		}
	}

	if (ishtml)
	{
		var html1 = new RegExp("<(\\w+)[^>]*>", "gi");
		var html2 = new RegExp("<\\/\\w+>", "gi");

		str = str.replace(html1, '');
		str = str.replace(html2, '');

		var html3 = new RegExp("&nbsp;");
		str = str.replace(html3, '');
	}
	else
	{
		var bbcode1 = new RegExp("\\[(\\w+)[^\\]]*\\]", "gi");
		var bbcode2 = new RegExp("\\[\\/(\\w+)\\]", "gi");

		str = str.replace(bbcode1, '');
		str = str.replace(bbcode2, '');
	}
	return str;
}

// #############################################################################
// emulation of the PHP version of vBulletin's construct_phrase() sprintf wrapper
function construct_phrase()
{
	if (!arguments || arguments.length < 1 || !is_regexp)
	{
		return false;
	}

	var args = arguments;
	var str = args[0];

	for (var i = 1; i < args.length; i++)
	{
		re = new RegExp("%" + i + "\\$s", "gi");
		str = str.replace(re, args[i]);
	}
	return str;
}

// #############################################################################
// set control panel frameset title
function set_cp_title()
{
	if (typeof(parent.document) != "undefined" && typeof(parent.document) != "unknown" && typeof(parent.document.title) == "string")
	{
		if (document.title != '')
		{
			parent.document.title = document.title;
		}
		else
		{
			parent.document.title = "vBulletin";
		}
	}
}

// #############################################################################
// open control panel help window
function js_open_help(scriptname, actiontype, optionval)
{
	window.open("help.php?s=" + SESSIONHASH + "&do=answer&page=" + scriptname + "&pageaction=" + actiontype + "&option=" + optionval, "helpwindow", "toolbar=no,scrollbars=yes,resizable=yes,width=600,height=450");
}

// #############################################################################
function switch_styleid(selectobj)
{
	styleid = selectobj.options[selectobj.selectedIndex].value;

	if (styleid == "")
	{
		return;
	}

	url = new String(window.location);
	fragment = new String("");

	// get rid of fragment
	url = url.split("#");

	// deal with the fragment first
	if (url[1])
	{
		fragment = "#" + url[1];
	}

	// deal with the main url
	url = url[0];

	// remove styleid=x& from main bit
	if (url.indexOf("styleid=") != -1 && is_regexp)
	{
		re = new RegExp("styleid=\\d+&?");
		url = url.replace(re, "");
	}

	// add the ? to the url if needed
	if (url.indexOf("?") == -1)
	{
		url += "?";
	}
	else
	{
		// make sure that we have a valid character to join our styleid bit
		lastchar = url.substr(url.length - 1);
		if (lastchar != "&" && lastchar != "?")
		{
			url += "&";
		}
	}
	window.location = url + "styleid=" + styleid + fragment;
}

// #############################################################################
// simple function to toggle the 'display' attribute of an object
function toggle_display(idname)
{
	obj = fetch_object(idname);
	if (obj)
	{
		if (obj.style.display == "none")
		{
			obj.style.display = "";
		}
		else
		{
			obj.style.display = "none";
		}
	}
	return false;
}

// #############################################################################
// ##################### vBulletin Cookie Functions ############################
// #############################################################################

// #############################################################################
// function to set a cookie
function set_cookie(name, value, expires, domain)
{
	if (!expires)
	{
		expires = new Date();
	}
	document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() +  "; path=/" +  "; domain=" + domain;
}

// #############################################################################
// function to retrieve a cookie
function fetch_cookie(name)
{
	cookie_name = name + "=";
	cookie_length = document.cookie.length;
	cookie_begin = 0;
	while (cookie_begin < cookie_length)
	{
		value_begin = cookie_begin + cookie_name.length;
		if (document.cookie.substring(cookie_begin, value_begin) == cookie_name)
		{
			var value_end = document.cookie.indexOf (";", value_begin);
			if (value_end == -1)
			{
				value_end = cookie_length;
			}
			return unescape(document.cookie.substring(value_begin, value_end));
		}
		cookie_begin = document.cookie.indexOf(" ", cookie_begin) + 1;
		if (cookie_begin == 0)
		{
			break;
		}
	}
	return null;
}

// #############################################################################
// function to delete a cookie
function delete_cookie(name)
{
	var expireNow = new Date();
	document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
}

// #############################################################################
// ################## vBulletin Collapse HTML Functions ########################
// #############################################################################

// #############################################################################
// function to toggle the collapse state of an object, and save to a cookie
function toggle_collapse(objid)
{
	if (!is_regexp)
	{
		return false;
	}
	
	obj = fetch_object("collapseobj_" + objid);	
	img = fetch_object("collapseimg_" + objid);
	cel = fetch_object("collapsecel_" + objid);
	
	if (!obj)
	{
		// nothing to collapse!
		if (img)
		{
			// hide the clicky image if there is one
			img.style.display = "none";
		}
		return false;
	}

	if (obj.style.display == "none")
	{
		obj.style.display = "";
		save_collapsed(objid, false);
		if (img)
		{
			img_re = new RegExp("_collapsed\\.gif$");
			img.src = img.src.replace(img_re, '.gif');
		}
		if (cel)
		{
			cel_re = new RegExp("^(thead|tcat)(_collapsed)$");
			cel.className = cel.className.replace(cel_re, '$1');
		}
	}
	else
	{
		obj.style.display = "none";
		save_collapsed(objid, true);
		if (img)
		{
			img_re = new RegExp("\\.gif$");
			img.src = img.src.replace(img_re, '_collapsed.gif');
		}
		if (cel)
		{
			cel_re = new RegExp("^(thead|tcat)$");
			cel.className = cel.className.replace(cel_re, '$1_collapsed');
		}
	}
	return false;
}

// #############################################################################
// update vbulletin_collapse cookie with collapse preferences
function save_collapsed(objid, addcollapsed)
{
	var collapsed = fetch_cookie("vbulletin_collapse");
	var tmp = new Array();

	if (collapsed != null)
	{
		collapsed = collapsed.split("\n");

		for (i in collapsed)
		{
			if (collapsed[i] != objid && collapsed[i] != "")
			{
				tmp[tmp.length] = collapsed[i];
			}
		}
	}

	if (addcollapsed)
	{
		tmp[tmp.length] = objid;
	}

	expires = new Date();
	expires.setTime(expires.getTime() + (1000 * 86400 * 365));
	set_cookie("vbulletin_collapse", tmp.join("\n"), expires,".xdcad.net");
}

// #############################################################################
// function to register a menu for later initialization
function vbmenu_register(controlid, nowrite, datefield)
{
	if (vbmenu_usepopups)
	{
		vbmenu_doregister(controlid, nowrite, datefield);
	}
}

// #############################################################################
// functions to handle active cells

// active cell mouse-over
function activecells_mouseover(e)
{
	this.className = this.swapclass;
	if (is_ie)
	{
		this.style.cursor = "hand";
	}
	else
	{
		this.style.cursor = "pointer";
	}
	return true;
}

// active cell mouse-out
function activecells_mouseout(e)
{
	this.className = this.origclass;
	this.style.cursor = "default";
	return true;
}

// active cell click
function activecells_click(e)
{
	this.className = this.origclass;
	
	if (r = this.id.match(/^([a-z]{1})([0-9]+)$/))
	{
		switch (r[1])
		{
			case "u": // user
				var script = "member.php?" + SESSIONURL + "u=";
				break;
			
			case "f": // forum
				var script = "forumdisplay.php?" + SESSIONURL + "f=";
				break;
			
			case "t": // thread
				var script = "showthread.php?" + SESSIONURL + "t=";
				break;
			
			case "p": // post
				var script = "showthread.php?" + SESSIONURL + "p=";
				break;
			
			case "m": // private message
				var script = "private.php?" + SESSIONURL + "pmid=";
				break;
			
			default:
				return;
		}
		window.location = script + r[2];
	}
}

// #############################################################################
// ############## Main vBulletin Javascript Initialization #####################
// #############################################################################

function vBulletin_init()
{
	if (is_webtv)
	{
		return true;
	}
	switch (vbDOMtype)
	{
		case "std": imgs = document.getElementsByTagName("img"); break;
		case "ie4": imgs = document.all.tags("img");             break;
		default:    imgs = false;                                break;
	}
	if (imgs)
	{
		// set 'title' tags for image elements
		for (var i = 0; i < imgs.length; i++)
		{
			if (!imgs[i].title && imgs[i].alt != "")
			{
				imgs[i].title = imgs[i].alt;
			}
		}
	}

	// init registered menus
	if (vbmenu_usepopups && vbmenu_registered.length > 0)
	{
		for (i in vbmenu_registered)
		{
			vbmenu_init(vbmenu_registered[i]);
		}

		// close all menus on mouse click
		document.onclick = vbmenu_close;
	}
	
	return true;
}

// #############################################################################
// function to initialize active cells
function activecells_init()
{
	// hide this functionality from browsers that break it
	if (is_webtv || is_opera)
	{
		return;
	}
	
	// init active alt color classes
	tds = document.getElementsByTagName("td");
	for (var i = 0; i < tds.length; i++)
	{
		switch (tds[i].className)
		{
			case "alt1Active":
			case "alt2Active":
			{
				tds[i].origclass = tds[i].className;
				tds[i].swapclass = iif(tds[i].className == "alt1Active", "alt2Active", "alt1Active");
				tds[i].onmouseover = activecells_mouseover;
				tds[i].onmouseout = activecells_mouseout;
				tds[i].onclick = activecells_click;
			}
			break;
		}
	}
}

function findobj(n, d) {
	var p,i,x; if(!d) d=document;
	if((p=n.indexOf("?"))>0 && parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n];
	for(i=0;!x && i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x && d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	return x;
}

function copycode(obj) {
	var rng = document.body.createTextRange();
	rng.moveToElementText(obj);
	rng.scrollIntoView();
	rng.select();
	rng.execCommand("Copy");
	rng.collapse(false);
	return false;
}

//
function setCookie(name,val)
{
	expires = new Date();
	expires.setTime(expires.getTime() + (1000 * 86400 * 365));
	set_cookie(name , val , expires , ".xdcad.net");
}

function getCookieVal(name)
{
    var allcookies=document.cookie;
    var pos=allcookies.indexOf(name+'=');
    if (pos != -1)
    {
        var start = pos + name.length + 1;
	    var end = allcookies.indexOf(";",start);
	    if (end == -1)
	        end = allcookies.length;
	
	    var value = allcookies.substring(start,end);
	    value = unescape (value);
    }else{
        value=-1000;
    }
    return value;
}
function IsRegUser()
{
    var uid=getCookieVal("bbuserid");
	isRegUsr=true;
    if (uid < 1)
    {
        alert("ÓÎ¿ÍÄãºÃ£¡ÄãÃ»ÓÐµÇÂ½¡£\nÇëµ½ÍøÕ¾Ê×Ò³µÇÂ½»ò×¢²áºóÔÙÀ´²é¿´¡£");
		isRegUsr=false;
    }
	return isRegUsr;
}
function openUrl(url,reg)
{
	if (url.indexOf("?")>0)
	{
		query="&s="+SESSIONURL;
	}else{
		query="?s="+SESSIONURL;
	}
	url=url+query;
	if (reg)
	{
	    if (IsRegUser())
	    {
            window.location=url;
	    }else{
			return false;
		}
	}else{
            window.location=url;
	}
	return false;
}
function popUrl(url,name,param,reg)
{
	if (name=="")
	{
	    name="_blank";
	}
	if (url.indexOf("?")>0)
	{
		query="&s="+SESSIONURL;
	}else{
		query="?s="+SESSIONURL;
	}
	url=url+query;
	if (reg)
	{
	    if (IsRegUser())
	    {
            window.open(url,name,param);
	    }else{
			return false;
		}
	}else{
            window.open(url,name,param);
	}
	return false;
}
//
function checkReferer() {
	var sRef = String(document.referrer);
	if (sRef) {
		if (sRef.indexOf("http://www.xdcad.net") != 0) {
			var sRedir = "http://www.xdcad.net/";
				window.top.location.href=sRedir;
		}
	}
}
function openScript(url, name , width, height){
	var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}

function PopWindow()
{ 
	openScript('messanger.asp?action=newmsg',420,320); 
}

function CheckUsrAxb(val)
{
	var axb=getCookieVal("bbaxb");
	var username=getCookieVal("bbusername");
	if (axb < val)
	{
		alert("ÄãºÃ£¬"+username+"\nÏÂÔØ¸ÃÎÄ¼þÒªÇóÄãµÄ°®ÐÄ±ÒÏÖ½ð´óÓÚ"+val+"\nÄãÏÖÔÚµÄÏÖ½ðÊÇ:"+axb);
		return false;
	}
	return true;
}
function CheckLastDownTime()
{
	var isReg=IsRegUser();
	if (isReg == false)
	{
		return false;
	}

	var checkAxb=CheckUsrAxb(10);
	if (checkAxb == false)
	{
		return false;
	}
    var jkuser=getCookieVal("bbjkuser");
    if (jkuser == 1)
    {
		return true;
    }
	var curtime = new Date();
    curtime=curtime.getTime()/1000;
    var a=new Number(curtime);
    curtime=curtime.toFixed();
    var oltimeperday=getCookieVal("bbonlinetimeperday");
    oltimeperday=10/oltimeperday;
    var downDiv=new Number(oltimeperday);
    downDiv=downDiv.toFixed();

	var last=getCookieVal("bblastdown");
	if (last == -1000 || last == 0 || last == "")
	{
        setCookie("bblastdown",curtime);
	}else{
		var c=curtime - last;
	    if (c < downDiv)
		{
			c=downDiv-c;
	        var username=getCookieVal("bbusername");
			alert("ÄãºÃ£¬"+username+"\n¸ù¾ÝÄãµÄÈÕ¾ùÔÚÏßÊ±¼ä£¬ÄãÏÂÔØÁ½¸öÎÄ¼þ¼äµÄÊ±¼ä¼ä¸ôÊÇ"+downDiv+"Ãë£¬\nÇë¹ý"+c+"ÃëºóÔÙÊÔ¡£");
			return false;
		}else{
            setCookie("bblastdown",curtime);
		}
	}
	return true;
}

function doPlayMusic(url,autostart)
{
//	var url1=url.replace(/(\s|\S)+$/,"");
//	alert (url);
	if (url.search(/(.rm|.ram)$/i)!= -1)
	{
//		alert(1);
		document.write ("\n<a href="+url+" target=\"_blank\">[ÏÂÔØµ½Ó²ÅÌ]</a>\n\n<br>");
        document.write("<object id=video1 classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' height=62 width=290>");
        document.write("<param name='controls' value='ControlPanel,StatusBar'>");
        document.write("<param name='console' value='Clip1'>");
        document.write("<param name='autostart' value='"+ autostart + "'>"); 
        document.write("<param name='loop' value='true'>"); 
        document.write("<param name='src' value='"+ url+ "'>");
        document.write("<embed value='"+ url + " type='audio/x-pn-realaudio-plugin' console='Clip1' controls='ControlPanel,StatusBar' height=60 width=468 autostart=true></embed></object>");
	}else{
//		alert(2);
	    document.write ("\n<a href="+url+" target=\"_blank\">[ÏÂÔØµ½Ó²ÅÌ]</a>\n\n<br><OBJECT style=\"border:1px solid #cccccc;\" id=mPlayer1 type=application/x-oleobject height=62 standby='Loading Windows Media Player components...' width=290 classid=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6><PARAM NAME='URL' VALUE='"+url+"'><PARAM NAME='rate' VALUE='1'><PARAM NAME='balance' VALUE='0'><PARAM NAME='defaultFrame' VALUE=''><PARAM NAME='playCount' VALUE='100'><PARAM NAME='autoStart' VALUE='"+autostart+"'><PARAM NAME='currentMarker' VALUE='0'><PARAM NAME='invokeURLs' VALUE='-1'><PARAM NAME='baseURL' VALUE=''><PARAM NAME='volume' VALUE='50'><PARAM NAME='mute' VALUE='0'><PARAM NAME='uiMode' VALUE='full'><PARAM NAME='stretchToFit' VALUE='0'><PARAM NAME='windowlessVideo' VALUE='0'><PARAM NAME='enabled' VALUE='-1'><PARAM NAME='enableContextMenu' VALUE='0'><PARAM NAME='fullScreen' VALUE='0'><PARAM NAME='SAMIStyle' VALUE=''><PARAM NAME='SAMILang' VALUE=''><PARAM NAME='SAMIFilename' VALUE=''><PARAM NAME='captioningID' VALUE=''><PARAM NAME='enableErrorDialogs' VALUE='0'><PARAM NAME='_cx' VALUE='7673'><PARAM NAME='_cy' VALUE='1640'></OBJECT>\n");
	}
}
function doPlayMusicWithGeChi(url,autostart,gechi)
{
document.write ("<div align=center>\n<table style=\"border: solid 3px #cccccc\" bgcolor=#000000 height=44 cellspacing=0 cellpadding=0 width=470 border=0>");
document.write ("  <tbody>");
document.write ("  <tr>");
document.write ("    <td valign=top width=36 height=1 rowspan=2><img height=174 src=\"/images/music/play_tt90_01.gif\" width=31></td>");
document.write ("    <td valign=top width=35 height=1 rowspan=2>");
document.write ("      <table style=\"border-collapse: collapse\" bordercolor=#111111 cellspacing=0 cellpadding=0 width=\"100%\" border=0>");
document.write ("        <tbody>");
document.write ("        <tr>");
document.write ("          <td width=\"100%\" bgcolor=#ef6518><img height=43 src=\"/images/music/play_tt90_02.gif\" width=292></td></tr>");
document.write ("        <tr>");
document.write ("          <td width=\"100%\" bgcolor=#ef6518>");
document.write ("            <table style=\"border-collapse: collapse\" height=113 cellspacing=0 cellpadding=0 width=292 border=0>");
document.write ("              <tbody>");
document.write ("              <tr>");
document.write ("                <td valign=top width=\"100%\" align=center height=113>");
document.write ("                  <marquee style=\"font-weight: bold; font-size: 9pt;color:#ffff00;\" onmouseover=this.stop() onmouseout=this.start() scrollamount=1 scrolldelay=10 direction=up width='100%' height=113>"+gechi+"</marquee>");
document.write ("				</td>");
document.write ("			  </tr>");
document.write ("	          </tbody>");
document.write ("	        </table>");
document.write ("	      </td>");
document.write ("	    </tr>");
document.write ("        <tr>");
document.write ("          <td width=\"100%\">");
document.write ("		    <img height=17 src=\"/images/music/play_tt90_07.gif\" width=292>");
document.write ("		  </td>");
document.write ("		</tr>");
document.write ("        <tr>");
document.write ("          <td width=\"100%\" >");
document.write ("            <table style=\"border-collapse: collapse\" height=75 cellspacing=0 cellpadding=0 width=290 border=0>");
document.write ("              <tbody>");
document.write ("              <tr>");
document.write ("                <td width=290 height=72>");
document.write ("                  <div align=center>");
var isRM=0;
	if (url.search(/(.rm|.ram)$/i)!= -1)
	{
		isRM=1;
        document.write("                      <object style=\"border:1px solid #cccccc;\" id=video1 classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' height=62 width=290>");
        document.write("                      <param name='controls' value='ControlPanel,StatusBar'>");
        document.write("                      <param name='console' value='Clip1'>");
        document.write("                      <param name='autostart' value='"+ autostart + "'>"); 
        document.write("                      <param name='loop' value='true'>"); 
        document.write("                      <param name='src' value='"+ url+ "'>");
        document.write("                      <embed value='"+ url + " type='audio/x-pn-realaudio-plugin' console='Clip1' controls='ControlPanel,StatusBar' height=60 width=468 autostart=true></embed></object>");
	}else{
        document.write ("                     <object style=\"border:1px solid #cccccc;\" id=mplayer1 type=application/x-oleobject height=62 standby='loading windows media player components...' width=290 classid=clsid:6bf52a52-394a-11d3-b153-00c04f79faa6><param name='url' value='"+url+"'><param name='rate' value='1'><param name='balance' value='0'><param name='defaultframe' value=''><param name='playcount' value='100'><param name='autostart' value='"+autostart+"'><param name='currentmarker' value='0'><param name='invokeurls' value='-1'><param name='baseurl' value=''><param name='volume' value='50'><param name='mute' value='0'><param name='uimode' value='full'><param name='stretchtofit' value='0'><param name='windowlessvideo' value='0'><param name='enabled' value='-1'><param name='enablecontextmenu' value='0'><param name='fullscreen' value='0'><param name='samistyle' value=''><param name='samilang' value=''><param name='samifilename' value=''><param name='captioningid' value=''><param name='enableerrordialogs' value='0'><param name='_cx' value='7673'><param name='_cy' value='1640'></object>");
	}
document.write ("                  </div>");
document.write ("		</td>");
document.write ("	      </tr>");
document.write ("	      </tbody>");
document.write ("	    </table>");
document.write ("	  </td>");
document.write ("	</tr>");
document.write ("	</tbody>");
document.write ("      </table>");
document.write ("    </td>");
document.write ("    <td valign=top width=37 height=1><img height=210 src=\"/images/music/play_tt90_03.gif\" width=61></td>");
document.write ("    <td valign=top width=61 height=1><map name=fpmap0><area shape=circle target=_blank coords=29,137,15></map><img height=210 src=\"/images/music/play_tt90_04.gif\" width=46 usemap=#fpmap0 border=0></td>");
document.write ("    <td valign=top width=292 height=1><img height=210 src=\"/images/music/play_tt90_05.gif\" width=40></td></tr>");
document.write ("  <tr>");
document.write ("    <td valign=top width=390 colspan=3 height=18 >");
document.write ("      <table style=\"border-collapse: collapse\" cellspacing=0 cellpadding=2 width=\"100%\" border=0>");
document.write ("        <tbody>");
document.write ("        <tr>");
document.write ("          <td width=\"100%\">");
document.write ("            <p align=center>");
//alert(isRM);
if (isRM == 1)
{
    document.write ("	    <a href=\"http://media.n169.com/RealPlayer10GOLD.exe\" target=_blank><img height=31 alt=\"Èç²»ÄÜÕý³£²¥·ÅÇëÏÂÔØ´ËRealOne Player 10²¥·ÅÆ÷\" src=\"/images/music/real.gif\" width=88 border=0></a>");
}else{
    document.write ("	    <a href=\"http://windowsmedia.com/download\" target=_blank><img height=32 alt=\"Èç²»ÄÜÕý³£²¥·ÅÇëÏÂÔØ´ËMedia Player 9²¥·ÅÆ÷\" src=\"/images/music/m7.gif\" width=88 border=0></a>");
}
document.write ("	    </p>");
document.write ("	  </td>");
document.write ("	</tr>");
document.write ("        <tr>");
document.write ("          <td width=\"100%\">");
document.write ("            <p align=center>");
document.write ("	    <a href="+url+" target=\"_blank\" title=\"ÏÂÔØ¸èÇúµ½Ó²ÅÌ\"><font color=#ef6518>[ÏÂÔØ¸èÇúµ½Ó²ÅÌ]</font></a>");
document.write ("	    </p>");
document.write ("	  </td>");
document.write ("	</tr>");
document.write ("        </tbody>");
document.write ("      </table>");
document.write ("    </td>");
document.write ("  </tr>");
document.write ("  </tbody>");
document.write ("</table></div>");
}
function Media()
{
    this.style = "position:relative;";
}
function Do_Media(a, w, h, o, id, href) {
    var s = "";
	if (o.spacing !=null)
	{
		s = "<div style='padding-bottom:"+o.spacing+"px;'>";
	}
    if (a.indexOf(".swf") != -1) {
        if (o.wmode == null || o.wmode == "") {
            o.wmode = "Opaque";
        }
        if (o.scale == null || o.scale == "") {
            o.scale = "exactfit";
        }
        switch (vbDOMtype) {
            case "std":
            case "ie4":
            {
                s += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='"+ADM_F +"' id='"+((id == null)?o.t:id)+"' width='"+w+"' height='"+h+"' ";
                if (o.style)s += " style='"+o.style+"'";
                if (o.extfunc)s += " "+o.extfunc+" ";
                s += " ><param name='movie' value='"+a+"'>";
                if (o.play)s += "<param name='play' value='"+o.play+"'>";
                if (o.wmode && o.wmode != "")s += "<param name='wmode' value='"+o.wmode+"'>";
                if (typeof(o.loop) != "undefined")s += "<param name='loop' value='"+o.loop+"'>";
                if (o.scale && o.scale != "")s += "<param name='scale' value='"+o.scale+"'>";
                s += "<param name='quality' value='autohigh'></object>";
            }
            break;
            case "ns4":
            {
                s = "<embed ";
                if (o.style)s += " style='"+o.style+"'";
                if (o.extfunc)s += " "+o.extfunc+" ";
                s += " src='"+a+"'"+" quality='autohigh' id='"+((id == null)?o.t:id)+"' name='"+((id == null)?o.t:id)+"' width='"+w+"' height='"+h+"' ";
                if (o.wmode && o.wmode != "")s += " wmode='"+o.wmode+"' ";
                if (typeof(o.loop) != "undefined")s += " loop='"+o.loop+"' ";
                if (o.scale && o.scale != "")s += "<param name='scale' value='"+o.scale+"'>";
                s += "type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></embed>";
            }
            break;
        }
    }
    else if(a.indexOf(".gif") != -1 || a.indexOf(".jpg") != -1) {
        if (href != null && href != "") {
            s += "<a href='"+href+"' target='_blank'>";
        }
        s += "<img ";
        if (o.style)s += " style='"+o.style+"'";
        if (o.extfunc)s += " "+o.extfunc+" ";
        s += " id='"+((id == null)?o.t:id)+"' src='"+a+"'  width='"+w+"' height='"+h+"'>";
        if (href != null && href != "") {
            s += "</a>";
        }
    }
	if (o.spacing !=null)
	{
		s +="</div>";
	}
    return s;
}
function rand(maxnumbers)
{
    return (Math.round(Math.random() * (maxnumbers-1))+1);
}

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 23:56, Fri Mar 19th 2004
|| # CVS: $RCSfile: vbulletin_global.js,v $ - $Revision: 1.86 $
|| ####################################################################
\*======================================================================*/