
//-->
/**
 * 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(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!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 _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=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){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[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;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};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;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;



<!--

/*
+ ----------------------------------------------------------------------------+
|        e107 website system - Javascript File.
|
|        $Source: /cvsroot/e107/e107_0.7/e107_files/e107.js,v $
|        $Revision: 1.19 $
|        $Date: 2006/04/29 22:52:38 $
|        $Author: e107coders $
+----------------------------------------------------------------------------+
*/

/*
 * NOTE: KEEP THIS AT THE TOP OF E107.JS!
 * localTime is recorded ASAP after page load; SyncWithServerTime is called at the END
 * of page processing. We want localTime and serverTime set in close chronological order.
 * Page Processing order is as follows:
 * A) All PHP code encountered sequentially in page
 * B) All Javascript code encountered sequentially in page NOT including function internals
 * So best proximity is achieved by setting
 * serverTime at END of php code, and localTime at START of js code.
 * NOTE: this method means reported times include transfer delay. It's slightly MORE accurate this way!
 * Final product: tdOffset cookie contains server-browser time difference in seconds,
 * independent of time zone. tzOffset contains browser time zone in minutes.
 */

var nowLocal = new Date();                /* time at very beginning of js execution */
var localTime = Math.floor(nowLocal.getTime()/1000);        /* time, in ms -- recorded at top of jscript */
/* NOTE: if serverDelta is needed for js functions, you must pull it from
 * the cookie (as calculated during a previous page load!)
 * The value calculated in SyncWithServerTime is not known until after the
 * entire page has been processed.
 */
function SyncWithServerTime(serverTime)
{
        if (serverTime) {
                  /* update time difference cookie */
                tdCookie='e107_tdOffset=';
                tdSetTimeCookie='e107_tdSetTime=';
                serverDelta=Math.floor(localTime-serverTime);
                  document.cookie = tdCookie+serverDelta;
                  document.cookie = tdSetTimeCookie+(localTime-serverDelta); /* server time when set */
        }

        tzCookie = 'e107_tzOffset=';
        if (document.cookie.indexOf(tzCookie) < 0) {
                /* set if not already set */
                timezoneOffset = nowLocal.getTimezoneOffset(); /* client-to-GMT in minutes */
                document.cookie = tzCookie + timezoneOffset;
        }
}

if(document.getElementById&&!document.all){ns6=1;}else{ns6=0;}
var agtbrw=navigator.userAgent.toLowerCase();
var operaaa=(agtbrw.indexOf('opera')!=-1);
var head="display:''";
var folder='';

function expandit(curobj, hide) {
        if(document.getElementById(curobj)) {
                  folder=document.getElementById(curobj).style;
        } else {
                if(ns6==1||operaaa==true) {
                        folder=curobj.nextSibling.nextSibling.style;
                } else {
                        folder=document.all[curobj.sourceIndex+1].style;
                }
   }
        if(folder.display=="none")
        {
                folder.display="";
        } else {
                folder.display="none";
        }
        if(hide) {
                var hide_objects = hide.split(",");
                for(i=0; i<hide_objects.length; i++) {
                        hide_objects[i]=hide_objects[i].replace(/^\s*(.*)/, "$1");
                        hide_objects[i]=hide_objects[i].replace(/(.*?)\s*$/, "$1");
                        if(document.getElementById(hide_objects[i])) {
                                hidden=document.getElementById(hide_objects[i]).style;
                                if(hidden.display=="") {
                                        hidden.display="none";
                                }
                        }
                }
        }
}

function urljump(url){
        top.window.location = url;
}

function setInner(id, txt) {
        document.getElementById(id).innerHTML = txt;
}

function jsconfirm(thetext){
                return confirm(thetext);
}

function insertext(str,tagid,display){
        document.getElementById(tagid).value = str;
        if(display){
                document.getElementById(display).style.display='none';
        }
}

function appendtext(str,tagid,display){
        document.getElementById(tagid).value += str;
        document.getElementById(tagid).focus();
        if(display){
                document.getElementById(display).style.display='none';
        }
}

function open_window(url,wth,hgt) {
        if('full' == wth){
                pwindow = window.open(url);
        } else {
                if (wth) {
                        mywidth=wth;
                } else {
                        mywidth=600;
                }

                if (hgt) {
                        myheight=hgt;
                } else {
                        myheight=400;
                }

                pwindow = window.open(url,'Name', 'top=100,left=100,resizable=yes,width='+mywidth+',height='+myheight+',scrollbars=yes,menubar=yes')
        }
        pwindow.focus();
}

function ejs_preload(ejs_path, ejs_imageString){
        var ejs_imageArray = ejs_imageString.split(',');
        for(ejs_loadall=0; ejs_loadall<ejs_imageArray.length; ejs_loadall++){
                var ejs_LoadedImage=new Image();
                ejs_LoadedImage.src=ejs_path + ejs_imageArray[ejs_loadall];
        }
}

function textCounter(field,cntfield) {
        cntfield.value = field.value.length;
}

function openwindow() {
        opener = window.open("htmlarea/index.php", "popup","top=50,left=100,resizable=no,width=670,height=520,scrollbars=no,menubar=no");
        opener.focus();
}

function setCheckboxes(the_form, do_check, the_cb){
        var elts = (typeof(document.forms[the_form].elements[the_cb]) != 'undefined') ? document.forms[the_form].elements[the_cb] : document.forms[the_form].elements[the_cb];
        var elts_cnt  = (typeof(elts.length) != 'undefined') ? elts.length : 0;
        if(elts_cnt){
                for(var i = 0; i < elts_cnt; i++){
                        elts[i].checked = do_check;
                }
        }else{
                elts.checked        = do_check;
                }
        return true;
}

var ref=""+escape(top.document.referrer);
var colord = window.screen.colorDepth;
var res = window.screen.width + "x" + window.screen.height;
var eself = document.location;

// From http://phpbb.com
var clientPC = navigator.userAgent.toLowerCase();
var clientVer = parseInt(navigator.appVersion);
var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;
var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);
var e107_selectedInputArea;
var e107_selectedRange;
var e107_dupCounter = 1;

// From http://www.massless.org/mozedit/
function mozWrap(txtarea, open, close){
        var selLength = txtarea.textLength;
        var selStart = txtarea.selectionStart;
        var selEnd = txtarea.selectionEnd;
        if (selEnd == 1 || selEnd == 2) selEnd = selLength;
        var s1 = (txtarea.value).substring(0,selStart);
        var s2 = (txtarea.value).substring(selStart, selEnd)
        var s3 = (txtarea.value).substring(selEnd, selLength);
        txtarea.value = s1 + open + s2 + close + s3;
        return;
}

function storeCaret (textAr){
        e107_selectedInputArea = textAr;
        if (textAr.createTextRange){
                e107_selectedRange = document.selection.createRange().duplicate();
        }
}

function addtext(text, emote){
        if (window.e107_selectedInputArea){
                var ta = e107_selectedInputArea;
                if (emote != true){
                        val = text.split('][');
                        }
                else { val = text; }

                if ((clientVer >= 4) && is_ie && is_win){
                        theSelection = document.selection.createRange().text; /* wrap selected text */
                        if (theSelection) {
                                if (emote != true){
                                        document.selection.createRange().text = val[0] +']' +  theSelection + '[' + val[1];
                                } else {
                                        document.selection.createRange().text = val + theSelection;
                                }
                                ta.focus();
                                theSelection = '';
                                return;
                        }

                }else if (ta.selectionEnd && (ta.selectionEnd - ta.selectionStart > 0)){
                        if (emote != true){
                                mozWrap(ta, val[0] +']', '[' + val[1]); /* wrap selected text */
                        } else {
                                mozWrap(ta, val, ''); /* wrap selected text */
                        }
                        return;
                }
                text = ' ' + text + ' ';
                if (ta.createTextRange && e107_selectedRange) {
                        var caretPos = e107_selectedRange; /* IE */
                        caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
                } else if (ta.selectionStart || ta.selectionStart == '0') { /* Moz */
                           var startPos = ta.selectionStart;
                        var endPos = ta.selectionEnd;
                        var charb4 = ta.value.charAt(endPos-1);
                        ta.value = ta.value.substring(0, endPos)+ text + ta.value.substring(endPos);
                } else {
                        ta.value  += text;
                }
                ta.focus();
        }
}

function help(help,tagid){
        if(tagid){
                document.getElementById(tagid).value = help;
        } else if(document.getElementById('dataform')) {
                document.getElementById('dataform').helpb.value = help;
        }
}
function externalLinks() {
        if (!document.getElementsByTagName) return;
        var anchors = document.getElementsByTagName("a");
        for (var i=0; i<anchors.length; i++) {
        var anchor = anchors[i];
        if (anchor.getAttribute("href") &&
                anchor.getAttribute("rel") == "external")
                anchor.target = "_blank";
        }
}

function eover(object, over) {
        object.className = over;
}

function duplicateHTML(copy,paste,baseid){
                if(document.getElementById(copy)){

                        e107_dupCounter++;
                        var type = document.getElementById(copy).nodeName; // get the tag name of the source copy.

                        var but = document.createElement('input');
                        var br = document.createElement('br');

                        but.type = 'button';
                        but.value = 'x';
                        but.className = 'button';
                        but.onclick = function(){ this.parentNode.parentNode.removeChild(this.parentNode); };

                        var destination = document.getElementById(paste);
                        var source      = document.getElementById(copy).cloneNode(true);

                        var newentry = document.createElement(type);

                        newentry.appendChild(source);
                        newentry.value='';
                        newentry.appendChild(but);
                        newentry.appendChild(br);
                        if(baseid)
                        {
                                newid = baseid+e107_dupCounter;
                                newentry.innerHTML = newentry.innerHTML.replace(new RegExp(baseid, 'g'), newid);
                                newentry.id=newid;
                        }

                        destination.appendChild(newentry);
                }
}

function preview_image(src_val,img_path){
        var ta;
        var desti

        var desti = src_val + '_prev';
        ta = document.getElementById(src_val).value;
        if(ta){
                document.getElementById(desti).src = img_path + ta;
        }else{
                document.getElementById(desti).src = '".e_IMAGE."generic/blank.gif';
        }
        return;
}


