﻿
/*****************************************
This following part is language-insensitive.
Always put reference to this file before tabcontent.js because the latter needs functions in here.
******************************************/

function popPhoto(url){window.open(url,"stdwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=no,width=770,height=540,left=200,top=150");return false;}
function popW(url){window.open(url,"stdwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=no,width=418,height=400,left=200,top=150");return false;}

function loadCommentWin ( postid, lang )
{
    var inputArea = document.getElementById ( 'commentInputArea' );
    var inputButton = document.getElementById ( 'btnLoadCW' );
    if ( null != inputArea )
    {
        inputButton.style.display='none';
        inputArea.innerHTML ="<iframe frameborder='0' width='522px' height='240px' marginwidth='1'marginheight='1' vspace='0' hspace='0' scrolling='no' src='/bbs/editreply.aspx?t="+postid+"&lang="+lang+"' / >";
    }
}
function editReply (postid,lang)
{
    var inputArea = document.getElementById ( '_rp'+postid );
    if ( null != inputArea )
    {
        inputArea.innerHTML ="<iframe frameborder='0' width='522px' height='240px' marginwidth='1'marginheight='1' vspace='0' hspace='0' scrolling='no' src='/bbs/editreply.aspx?r="+postid+"&lang="+lang+"' / >";
        inputArea.className = "";
    }
}

function delReply (postid,lang)
{
    var inputArea = document.getElementById ( '_rp'+postid );
    if ( null != inputArea )
    {
        inputArea.innerHTML ="<iframe frameborder='0' width='522px' height='120px' marginwidth='1'marginheight='1' vspace='0' hspace='0' scrolling='no' src='/bbs/editreply.aspx?r="+postid+"&lang="+lang+"&act=del' / >";
        inputArea.className = "";
    }
}

function replyProp (postid,lang)
{
    return popW( '/members/prop/bbsuse.aspx?tr='+ postid );
}

function topicProp (postid,lang)
{
    return popW( '/members/prop/bbsuse.aspx?tt='+ postid );
}

TranslateElements=function(A,B,C,D){
    var e=A.getElementsByTagName(B);
    var E,s;
    for (var i=0;i<e.length;i++){if (E=e[i].getAttribute('gnlLang')){
        if (s=GNLLang[E]){if (D) s=HTMLEncode(s);eval('e[i].'+C+' = s');}}}};
TranslatePage=function(A){
    TranslateElements(A,'INPUT','value');
    TranslateElements(A,'SPAN','innerHTML');
    TranslateElements(A,'LABEL','innerHTML');
    TranslateElements(A,'OPTION','innerHTML',true);
    TranslateElements(A,'DIV','innerHTML');
};

function HTMLEncode(A){if (!A) return '';A=A.replace(/&/g,'&amp;');A=A.replace(/</g,'&lt;');A=A.replace(/>/g,'&gt;');return A;};

/* 
	by Paul@YellowPencil.com and Scott@YellowPencil.com
	feel free to delete all comments except for the above credit
*/

// Initialize Scripts - is this a browser that understands DOM?

function scriptInit() {
if (!document.getElementById) {
	return;
	}
}

// Set up Event Listener - the script that allows us to use the addEvent call below

function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
	elm.addEventListener(evType, fn, useCapture);
	return true;
	} else if (elm.attachEvent) {
	var r = elm.attachEvent('on' + evType, fn);
	return r;
	} else {
	elm['on' + evType] = fn;
	}
}

function closeAdWin()
{
    var t = document.getElementById ( 'adColRight' );
    if ( null != t )
    {
        t.style.visibility='hidden';
        setCookie('AdVisible','hide');
    }
    return false;
}
function showPopAds()
{
    var t = document.getElementById ( 'adColRight' );
    if ( null != t )
    {
        if ( getCookie('AdVisible')!="hide" )
            t.style.visibility='visible';
        else
            t.style.visibility='hidden';
     }
}

function getCookie(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

function setCookie(name, value){
document.cookie = name+"="+value //cookie value is domain wide (path=/)
}


// Start Column Script

function setTall() {
	if (document.getElementById) {
		// the divs array contains references to each column's div element.  
		// Replace 'center' 'right' and 'left' with your own.  
		// Or remove the last one entirely if you've got 2 columns.  Or add another if you've got 4!
		var divs = new Array(document.getElementById('pageRightCol'), document.getElementById('pageLeftCol'));
		
		// Let's determine the maximum height out of all columns specified
		var maxHeight = 0;
		for (var i = 0; i < divs.length; i++) {
		    if (!divs[i]) return;
			if (divs[i].offsetHeight > maxHeight) maxHeight = divs[i].offsetHeight;
		}
		
		// Let's set all columns to that maximum height
		for (var i = 0; i < divs.length; i++) {
			divs[i].style.height = maxHeight + 'px';

			// Now, if the browser's in standards-compliant mode, the height property
			// sets the height excluding padding, so we figure the padding out by subtracting the
			// old maxHeight from the new offsetHeight, and compensate!  So it works in Safari AND in IE 5.x
			if (divs[i].offsetHeight > maxHeight) {
				divs[i].style.height = (maxHeight - (divs[i].offsetHeight - maxHeight)) + 'px';
			}
		}
	}
}

//** Tab Content script
//** Last updated: Nov 8th, 06

var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered?

////NO NEED TO EDIT BELOW////////////////////////
var tabcontentIDs=new Object()

function expandcontent(linkobj){
var ulid=linkobj.parentNode.parentNode.id //id of UL element
var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents
for (var i=0; i<ullist.length; i++){
ullist[i].className=""  //deselect all tabs
if (typeof tabcontentIDs[ulid][i]!="undefined") //if tab content within this array index exists (exception: More tabs than there are tab contents)
document.getElementById(tabcontentIDs[ulid][i]).style.display="none" //hide all tab contents
}
linkobj.parentNode.className="selected"  //highlight currently clicked on tab
document.getElementById(linkobj.getAttribute("rel")).style.display="block" //expand corresponding tab content
saveselectedtabcontentid(ulid, linkobj.getAttribute("rel"))
}

function expandtab(tabcontentid, tabnumber){ //interface for selecting a tab (plus expand corresponding content)
var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
if (thetab.getAttribute("rel"))
expandcontent(thetab)
}

function savetabcontentids(ulid, relattribute){// save ids of tab content divs
if (typeof tabcontentIDs[ulid]=="undefined") //if this array doesn't exist yet
tabcontentIDs[ulid]=new Array()
tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute
}

function saveselectedtabcontentid(ulid, selectedtabid){ //set id of clicked on tab as selected tab id & enter into cookie
if (enabletabpersistence==1) //if persistence feature turned on
setCookie(ulid, selectedtabid)
}

function getullistlinkbyId(ulid, tabcontentid){ //returns a tab link based on the ID of the associated tab content
var ullist=document.getElementById(ulid).getElementsByTagName("li")
for (var i=0; i<ullist.length; i++){
if (ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){
return ullist[i].getElementsByTagName("a")[0]
break
}
}
}

function initializetabcontent(){
for (var i=0; i<arguments.length; i++){ //loop through passed UL ids
if (enabletabpersistence==0 && getCookie(arguments[i])!="") //clean up cookie if persist=off
setCookie(arguments[i], "")
var clickedontab=getCookie(arguments[i]) //retrieve ID of last clicked on tab from cookie, if any
var ulobj=document.getElementById(arguments[i])
var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL
for (var x=0; x<ulist.length; x++){ //loop through each LI element
var ulistlink=ulist[x].getElementsByTagName("a")[0]
if (ulistlink.getAttribute("rel")){
savetabcontentids(arguments[i], ulistlink.getAttribute("rel")) //save id of each tab content as loop runs
ulistlink.onclick=function(){
expandcontent(this)
return false
}
if (ulist[x].className=="selected" && clickedontab=="") //if a tab is set to be selected by default
expandcontent(ulistlink) //auto load currenly selected tab content
}
} //end inner for loop
if (clickedontab!=""){ //if a tab has been previously clicked on per the cookie value
var culistlink=getullistlinkbyId(arguments[i], clickedontab)
if (typeof culistlink!="undefined") //if match found between tabcontent id and rel attribute value
expandcontent(culistlink) //auto load currenly selected tab content
else //else if no match found between tabcontent id and rel attribute value (cookie mis-association)
expandcontent(ulist[0].getElementsByTagName("a")[0]) //just auto load first tab instead
}
} //end outer for loop
}


/* Toolbar Functions */
 
function OMO()
{
if (window.event.srcElement.tagName == "IMG")
event.srcElement.parentElement.className="T";
else
event.srcElement.className="T";
}
function OMOU()
{
if (window.event.srcElement.tagName == "IMG")
event.srcElement.parentElement.className="T";
else
event.srcElement.className="P";
}

var MOL=new Array(); 

function MenuObj(_A,_B,_C,_D,_E,_F,_G,_H,_I)
{
	this.name=_A;
	this.bOn=_E;
	this.bOf=_F;
	this.bA=_G;
	this.SBS=SBS;
	this.showing=false;
	this.TM=TM;
	document.onclick=MCH;
	this.Direction=_I;
	MOL[MOL.length]=this;
	this.divObj= document.getElementById ( _B);
	if (this.divObj) this.divStyleObj=this.divObj.style;
	this.refTDObj=document.getElementById ( _C);
	if (_D)
		this.DdTDObj=document.getElementById ( _D);
	this.frmObj=document.getElementById (_H);
	this.strShow='visible';
	this.strHide='hidden';
}

function ROP(ObjRef)
{
	var theObj=null;
	if (ObjRef)
	{
		if (typeof ObjRef != 'object')
			theObj=eval(ObjRef);
		else
			theObj=ObjRef;
		return theObj;
	}
	else
		return false;
}

function TM()
{
if (!this.showing)
{
var RelObjCords=getXY(this.refTDObj);
if (this.Direction)
{
this.divStyleObj.top =  RelObjCords.top -this.divObj.offsetHeight + "px";
this.divStyleObj.left =  RelObjCords.left + "px";
}
else
{
this.divStyleObj.top =  RelObjCords.top + 22 + "px";
this.divStyleObj.left =  RelObjCords.left + "px";
}
var pCurrMenuObj=ROP(this);
CM(this);
this.SBS('clicked');
this.divStyleObj.visibility =  this.strShow;
this.showing=true;
}
else
{
this.divStyleObj.visibility =  this.strHide;
this.showing=false;
this.SBS();
}
}
function CM(callerObj)
{
for (aIndex=0;aIndex < MOL.length; aIndex++)
{
if ((callerObj) && (callerObj.name != MOL[aIndex].name))
{	
if (MOL[aIndex].showing)
{
MOL[aIndex].TM();
MOL[aIndex].SBS();
}
}
else
{
if (MOL[aIndex].showing)
{
MOL[aIndex].TM();
MOL[aIndex].SBS();
}
}
}
}
function MCH(e, srcObj, srcIsMenuDiv)
{
var srcElem;
if (!e)
var e=window.event;
e.cancelBubble=true;
if (srcObj)
{
var pCurrMenuObj=ROP(srcObj); 
if (!srcIsMenuDiv)
pCurrMenuObj.divObj.onclick="MCH(event,"+srcObj+",true)";
pCurrMenuObj.TM();
}
else
CM();
}
function MME(e, srcObj)
{
	try
	{
		if (!e) 
			var e=window.event;
		var pCurrMenuObj=ROP(srcObj);
		if (!pCurrMenuObj.showing)
		{
			if (e.type == 'mouseover')
			pCurrMenuObj.SBS('on');
			else if ((e.type == 'mouseout') || (e.type == 'blur'))
			pCurrMenuObj.SBS();
		}
	}
	catch(e){}
}
function SBS(wS)
{
if (typeof this.refTDObj != "undefined")
{
if (wS == 'on')
{
if (this.bOn)
{
if (typeof this.DdTDObj != "undefined")
this.DdTDObj.className=this.bOn;
this.refTDObj.className=this.bOn;
}
}
else if (wS == 'clicked')
{
if (this.bA)
{
if (typeof this.DdTDObj != "undefined")
this.DdTDObj.className=this.bA;
this.refTDObj.className=this.bA;
}
}
else
{
if (this.bOf)
{
if (typeof this.DdTDObj != "undefined")
this.DdTDObj.className=this.bOf;
this.refTDObj.className=this.bOf;
}
}
}
}
function getXY(Obj) 
{
for (var sumTop=0,sumLeft=0;Obj!=document.body;sumTop+=Obj.offsetTop,sumLeft+=Obj.offsetLeft, Obj=Obj.offsetParent);
return {left:sumLeft,top:sumTop}
}
function MO(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="T";
}
function MU(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="P";
}
function MOH(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="T";
}
function MUH(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="H";
}
function MOD(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="S";
}
function MUD(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="R";
}
function MO_D(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="X";
}
function MU_D(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="W";
}
function MOD_D(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="Y";
}
function MUD_D(e)
{
if (!e)
var e=window.event;
var S=e.srcElement;
while (S.tagName!="TD")
{S=S.parentNode;}
if ( !S.getAttribute('disabled') ) S.className="Y";
}
/* Fix for window.event */
if(window.addEventListener)
{
	FixPrototypeForGecko();
}
function FixPrototypeForGecko()
{
	HTMLElement.prototype.__defineGetter__("runtimeStyle",element_prototype_get_runtimeStyle);
	window.constructor.prototype.__defineGetter__("event",window_prototype_get_event);
	Event.prototype.__defineGetter__("srcElement",event_prototype_get_srcElement);
}
function element_prototype_get_runtimeStyle()
{
	//return style instead...
	return this.style;
}
function window_prototype_get_event()
{
	return SearchEvent();
}
function event_prototype_get_srcElement()
{
	return this.target;
}

function SearchEvent()
{
	//IE
	if(document.all)
		return window.event;
		
	func=SearchEvent.caller;
	while(func!=null)
	{
		var arg0=func.arguments[0];
		if(arg0)
		{
			if(arg0.constructor==MouseEvent)
			{
				return arg0;}
		}
		func=func.caller;
	}
	return null;
}


//Email support
function CntCkd()
{
var smsbox = GetWorkingForm ();
var trk=0;
for (var i=0;i<smsbox.elements.length;i++){
var e = smsbox.elements[i];
if (e.type=='checkbox' && e.name!='ckall')
if (e.checked) trk++;
}
return trk;
}

function CA(checkall){
var trk=0;
var last;
var smsbox = GetWorkingForm ();
for (var i=0;i<smsbox.elements.length;i++){
var e = smsbox.elements[i];
if (e.type=='checkbox' && e.name!='ckall'){
if (checkall=='all')
e.checked=smsbox.ckall.checked;
if (e.checked){
trk++;
last=e;
}
}
}
}

function Del()
{
if (CntCkd()==0) alert ("您必须选中至少一封邮件");
else
{
var smsbox = GetWorkingForm ();
smsbox.Act.value = 'del';
smsbox.submit();
}
}

function Move ( t )
{
if (CntCkd()==0) alert ("您必须选中至少一封邮件");
else
{
var smsbox = GetWorkingForm ();
smsbox.Act.value = 'move';
smsbox.tbValue.value = t;
smsbox.submit();
}
}

function Empty()
{
if (window.confirm('您确信要永久删除废件箱里的全部邮件吗？'))
{
var smsbox = GetWorkingForm ();
smsbox.Act.value = 'empty';
smsbox.submit();
}
}


/*************** Swf Object ******************/
/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if (!window.opera && document.all && this.installedVer.major > 7) {
		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
		deconcept.SWFObject.doPrepUnload = true;
	}
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', false);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	useExpressInstall: function(path) {
		this.xiSWFPath = !path ? "expressinstall.swf" : path;
		this.setAttribute('useExpressInstall', true);
	},
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs[variablePairs.length] = key +"="+ variables[key];
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "PlugIn");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "ActiveX");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
		var axo = 1;
		var counter = 3;
		while(axo) {
			try {
				counter++;
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
//				document.write("player v: "+ counter);
				PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
			} catch (e) {
				axo = null;
			}
		}
	} else { // Win IE (non mobile)
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if (param == null) { return q; }
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i = objects.length - 1; i >= 0; i--) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
if (deconcept.SWFObject.doPrepUnload) {
	if (!deconcept.unloadSet) {
		deconcept.SWFObjectUtil.prepUnload = function() {
			__flash_unloadHandler = function(){};
			__flash_savedUnloadHandler = function(){};
			window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
		}
		window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
		deconcept.unloadSet = true;
	}
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;



/************** Dynamic Iframe Height **********************/

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
//extra height in px to add to iframe in FireFox 1.0+ browsers
var FFextraHeight=getFFVersion>=0.1? 16 : 0 

function dynIFrameSize(iframename) {
  var pTar = null;
  if (document.getElementById){
    pTar = document.getElementById(iframename);
  }
  else{
    eval('pTar = ' + iframename + ';');
  }
  if (pTar && !window.opera){
    //begin resizing iframe
    pTar.style.display="block"
    
    if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight){
      //ns6 syntax
      pTar.height = pTar.contentDocument.body.offsetHeight+FFextraHeight; 
    }
    else if (pTar.Document && pTar.Document.body.scrollHeight){
      //ie5+ syntax
      pTar.height = pTar.Document.body.scrollHeight;
    }
  }
}



/************* Dynamic page loader *******************/
   
function DoIncJs(sSrc){
    var oHead = document.getElementsByTagName('head')[0];
    var oScript = document.createElement('script');
    oScript.type = "text/javascript";
    oScript.src = sSrc;
    oHead.appendChild(oScript);
}

function IncJsFiles(sUrls) {
    var sUrls=sUrls.split(",");
    for(var i=0;i<sUrls.length;i++) {
        DoIncJs(sUrls[i]);
    }
}



function RenderDiv(divName,content)
{
    var t = document.getElementById (divName);
    if (!t) alert ( "System Error:No object in dom tree:"+divName );
    else t.innerHTML = content;
}

function LoadDiv ( divName,pageNum,TopicID)
{
    IncJsFiles( "/cms/ReplyLoader.aspx?t=" + TopicID+"&d="+divName+"&p="+pageNum);
    return false;
}
function NewPost (id)
{
    return popEditWin("/bbs/editreply.aspx?t="+id );
}
function EditPost (id)
{
    return popEditWin("/bbs/editreply.aspx?r="+id );
}
function DelPost (id)
{
    return popEditWin("/bbs/editreply.aspx?r="+id+"&act=del" );
}

function popEditWin(url){window.open(url,"editwin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=no,width=500,height=280,left=200,top=150");return false;}

