/*
*######################################
* eWebEditor v7.3 - Advanced online web based WYSIWYG HTML editor.
* Copyright (c) 2003-2011 eWebSoft.com
*
* For further information go to http://www.ewebeditor.net/
* This copyright notice MUST stay intact for use.
*######################################
*/

var cj=new Object();var hM=document.location.search.substr(1).split('&');for(i=0;i<hM.length;i++){var jh=hM[i].split('=');cj[jh[0]]=jh[1];}var EWIN=parent.EWIN;var O=EWIN.O;var dm=EWIN.dm;var H=EWIN.H;var t=EWIN.t;var az=EWIN.az;var lang=EWIN.lang;var config=EWIN.config;var V=EWIN.V;var cw=parent.cw();if(cw){cw=cw.contentWindow.yK;}H.oJ(window);function mh(aQ,ah){return(cj[aQ])?cj[aQ]:ah;};function kl(url){document.write('<scr'+'ipt type="text/javascript" src="'+url+'"><\/scr'+'ipt>');};function fo(av){rj=0;pM=av.length;if(fo.arguments.length==2){oP=fo.arguments[1].toLowerCase();}else{oP="all";}for(var i=0;i<av.length;i++){yi=av.substring(rj,rj+1);yH=av.substring(pM,pM-1);if((oP=="all"||oP=="left")&&yi==" "){rj++;}if((oP=="all"||oP=="right")&&yH==" "){pM--;}}av=av.slice(rj,pM);return av;};function dz(uc,xG){alert(xG);uc.focus();uc.select();return false;};function mH(color){var tf=color;if(tf=="")return true;if(tf.length!=7)return false;return(tf.search(/\#[a-fA-F0-9]{6}/)!= -1);};function AM(av){return(av.search(/[^0-9]+/)== -1);};function zg(av){return(AM(av)&&parseInt(av)>0);};function fE(e){if(!e){e=window.event;}if((e.keyCode>=48&&e.keyCode<=57)||(e.keyCode>=35&&e.keyCode<=40)||e.keyCode==46||e.keyCode==8){return true;}return H.as(e);};function gb(rd){var aE="selcolor.htm?returnfieldflag="+rd;dm.OpenDialog(aE);};function vE(){dm.OpenDialog("backimage.htm?action=other");};function jO(type,rd){dm.OpenDialog('browse.htm?returnfieldflag='+rd+'&type='+type);};function bQ(uE,ah){for(var i=0;i<uE.length;i++){if(uE.options[i].value==ah){uE.selectedIndex=i;return true;}}return false;};function fn(av){av=fo(av);if(av!=""){var eT=parseFloat(av);if(isNaN(eT)){av="";}else{av=eT;}}return av;};function zw(url){var eT;var b=true;eT=url.substring(0,7);eT=eT.toUpperCase();if((eT!="HTTP://")||(url.length<10)){b=false;}return b;};function iW(url,nf){var eT;var b=false;var s=nf.toUpperCase().split("|");for(var i=0;i<s.length;i++){eT=url.substr(url.length-s[i].length-1);eT=eT.toUpperCase();s[i]="."+s[i];if(s[i]==eT){b=true;break;}}return b;};function sJ(aE){if(aE.substring(0,1)=="/"){return aE;}if(aE.indexOf("://")>=0){return aE;}var pl=O.cd;while(aE.substr(0,3)=="../"){aE=aE.substr(3);pl=pl.substring(0,pl.lastIndexOf("/"));}return pl+"/"+aE;};function qb(aE){if(config.BaseHref==""){return aE;}if(aE.substring(0,1)=="/"){return aE;}if(aE.indexOf("://")>=0){return aE;}var hO=config.BaseHref;hO=hO.substring(0,hO.length-1);while(aE.substring(0,3)=="../"){aE=aE.substr(3);hO=hO.substring(0,hO.lastIndexOf("/"));}return hO+"/"+aE};function ya(aE){var oH=O.cd+"/plugin/";while(true){var bX=aE.indexOf("/");var fG=oH.indexOf("/");if(bX>=0&&bX==fG){if(aE.substring(0,bX+1)==oH.substring(0,fG+1)){aE=aE.substr(bX+1);oH=oH.substr(fG+1);}else{break;}}else{break;}}var s=oH.replace(/[^\/]+/gi,'');var n=s.length;for(var i=0;i<n;i++){aE="../"+aE;}return aE;};function gn(url){switch(config.BaseUrl){case "0":url=sJ(url);return zO(url);break;case "1":return sJ(url);break;case "2":case "3":return O.ic+sJ(url);break;}};function zO(url){var baseHref=config.BaseHref;var b=true;while(b){var bX=url.indexOf("/");var fG=baseHref.indexOf("/");if((bX>=0)&&(fG>=0)){var yT=url.substring(0,bX+1);var xV=baseHref.substring(0,fG+1);if(yT==xV){url=url.substr(bX+1);baseHref=baseHref.substr(fG+1);}else{b=false;}}else{b=false;}}if(baseHref!=""){var a=baseHref.split("/");for(var i=1;i<a.length;i++){url="../"+url;}}return url;};function At(){var w=tabDialogSize.offsetWidth+6;var h=tabDialogSize.offsetHeight+25;if(t.Av){h+=20;}window.dialogWidth=w+"px";window.dialogHeight=h+"px";window.dialogLeft=(screen.availWidth-w)/2;window.dialogTop=(screen.availHeight-h)/2;};function AO(R){if(!R["imageinitliazed"]){R["oncontextmenu"]=new Function("event.returnValue=false");R["onmouseout"]=new Function("vC(this)");R["onmousedown"]=new Function("ws(this)");R["unselectable"]="on";R["imageinitliazed"]=true;}R.className="AO";};function vC(R){R.className="vC";};function ws(R){R.className="ws";};function nr(db){var mu;switch(db){case "image":mu=config.AllowImageSize;break;case "flash":mu=config.AllowFlashSize;break;case "media":mu=config.AllowMediaSize;break;case "file":mu=config.AllowFileSize;break;default:return "";}var zG=parseFloat(mu)*1024;var html="<iframe name='myuploadformtarget' style='display:none;position:absolute;width:0px;height:0px' src='blank.htm'></iframe>"+"<form action='../"+config.ServerExt+"/upload."+config.ServerExt+"?action=save&type="+db+"&style="+az.StyleName+"&cusdir="+az.CusDir+"&skey="+az.SKey+"' method=post name=myuploadform enctype='multipart/form-data' style='margin:0px;padding:0px;width:100%;border:0px;' target='myuploadformtarget'>"+"<input type=hidden name='MAX_FILE_SIZE' value='"+zG+"'>"+"<input type=file name='uploadfile' id='uploadfile' size=28  onchange=\"this.form.originalfile.value=this.value;try{fr();} catch(e){}\">"+"<input type=hidden name='originalfile' value=''>"+"</form>";return html;};function jT(ap,cR,yA){var kT="";switch(ap){case "ext":kT=lang["ErrUploadInvalidExt"]+":"+cR;break;case "size":kT=lang["ErrUploadSizeLimit"]+":"+yA+"KB";break;case "file":kT=lang["ErrUploadInvalidFile"];break;case "style":kT=lang["ErrInvalidStyle"];break;case "space":kT=lang["ErrUploadSpaceLimit"]+":"+config.SpaceSize+"MB";break;default:kT=ap;break;}return kT;};function rc(aQ){var wM="";var ge=aQ+"=";if(document.cookie.length>0){qr=document.cookie.indexOf(ge);if(qr!= -1){qr+=ge.length;var fj=document.cookie.indexOf(";",qr);if(fj== -1){fj=document.cookie.length;}wM=unescape(document.cookie.substring(qr,fj));}}return wM;};function rf(aQ,ah){var op="";op=new Date((new Date()).getTime()+24*365*3600000);op=";expires="+op.toGMTString();document.cookie=aQ+"="+escape(ah)+op;};var aI;function fv(oQ){if(aI){aI=null;}var b=false;try{aI=new ActiveXObject("eWebSoft.eWebEditor3");var mJ=aI.Version;if(parseFloat(mJ.replace(/[^0123456789]+/gi,""))>=3200){aI.Lang="zh-cn";aI.SendUrl=O.SendUrl;aI.LocalSize=config.AllowLocalSize;aI.LocalExt=config.AllowLocalExt;b=true;}}catch(e){}if(!b&&oQ){dm.OpenDialog("installactivex.htm",true);}return b;};function eE(){var eb=aI.Error;if(eb!=""){var hF,fY;if(eb.indexOf(":")>=0){var a=eb.split(":");hF=a[0];fY=a[1];}else{hF=eb;fY="";}switch(hF){case "L":alert(lang["ErrLicense"]);break;case "InvalidFile":alert(lang["ErrInvalidFile"]+":"+fY);break;default:alert(eb);}return true;}return false;};function ai(R,cl,hx){if(hx==null||hx.length==0){R.removeAttribute(cl,0);}else{R.setAttribute(cl,hx,0);}};function mK(R,al,hn){ai(R,"_ewebeditor_ta_"+al,encodeURIComponent(hn));};function dH(R,cl){var uS=R.attributes[cl];if(uS==null|| !uS.specified){return "";}var py=R.getAttribute(cl,2);if(py==null){py=uS.nodeValue;}return(py==null?"":py);};function dY(R,cl){cl=cl.replace(/\-(\w)/g,function(zy,ra){return ra.toUpperCase();});var ah=R.style[cl];if(ah&&(!t.bu)&&cl.indexOf("Color")>=0){ah=yz(ah);}if(!ah){switch(cl){case "backgroundColor":cl="bgColor";break;case "textAlign":cl="align";break;case "verticalAlign":cl="valign";break;default:}ah=dH(R,cl);}return ah;};function jV(ah){var n=parseInt(ah);if(isNaN(n)){return '';}if(ah.substr(ah.length-1)!="%"){ah=n+"";}return ah;};function vo(R,al){var tZ="_ewebeditor_ta_"+al;var vA=R.attributes[tZ];if(vA==null|| !vA.specified){return dH(R,al);}else{return decodeURIComponent(R.getAttribute(tZ,2));}};function vc(R){return dH(R,"_ewebeditor_fake_tag");};function wf(R){return decodeURIComponent(dH(R,"_ewebeditor_fake_value"));};function wZ(R,K){ai(R,'_ewebeditor_fake_value',encodeURIComponent(K));};function uz(N){if(N==null)return "00";N=parseInt(N);if(N==0||isNaN(N))return "00";N=Math.max(0,N);N=Math.min(N,255);N=Math.round(N);return "0123456789ABCDEF".charAt((N-N%16)/16)+"0123456789ABCDEF".charAt(N%16);};function yz(av){if(av.substring(0,3)=='rgb'){var bi=av.split(",");var r=bi[0].replace('rgb(','').trim();var g=bi[1].trim();var b=bi[2].replace(')','').trim();var yl=[uz(r),uz(g),uz(b)];return "#"+yl.join('');}else{return av;}};var HtmlParamParser={Init:function(K){this.qB=new Object();this.Html=K;var bv=new RegExp("<object(?=[\\s>])","gi");if(bv.test(K)){this.nA="object";bv=/<param\s+name\s*?=\s*?([\'\"]?)(\w+)\1[\s]+value\s*?=\s*?(\w+|\'[^\'>]+\'|\"[^\">]+\")[^>]*?>/gi;while((bi=bv.exec(K))!=null){var eo=RegExp.$3;if(eo.substring(0,1)=='\''||eo.substring(0,1)=='"'){eo=eo.substring(1,eo.length-1);}this.qB[RegExp.$2.toLowerCase()]=eo;}}else{this.nA="common";bv=/\s(\w+)\s*?=\s*?(\w+|\'[^\'>]+\'|\"[^\">]+\")/gi;while((bi=bv.exec(K))!=null){var eo=RegExp.$2;if(eo.substring(0,1)=='\''||eo.substring(0,1)=='"'){eo=eo.substring(1,eo.length-1);}this.qB[RegExp.$1.toLowerCase()]=eo;}}},cP:function(ag){return(this.qB[ag])?this.qB[ag]:"";},xY:function(){return this.Html;},jp:function(ag,ah){var K=this.Html;function gH(m,cV){if(ah==''){return '';}else{return '<param name="'+ag+'" value="'+ah+'">';}};function gE(m){return m+'<param name="'+ag+'" value="'+ah+'">';};if(this.nA=='object'){var bv=new RegExp('<param(?=\\s)[^>]*?\\sname\\s*?=\\s*?(\w+|\'[^\'>]+\'|\"[^\">]+\")[^>]*?>','gi');if(bv.test(K)){K=K.replace(bv,gH);}else{if(ah!=''){K=K.replace(/<object[^>]*?>/,gE);}}K=this.wi(K,'embed',ag,ah);}else{K=this.wi(K,'\\w+',ag,ah);}this.Html=K;},wi:function(K,ae,ag,ah){function gH(m,cV,gs,hE){if(ah==''){return cV+hE;}else{return cV+' '+ag+'="'+ah+'"'+hE;}};function gE(m){return m.substring(0,m.length-1)+' '+ag+'="'+ah+'">';};var bv=new RegExp('(<'+ae+'(?=[\\s>])[^>]*?)\\s'+ag+'\\s*?=\\s*?(\w+|\'[^\'>]+\'|\"[^\">]+\")([^>]*>)','gi');if(bv.test(K)){K=K.replace(bv,gH);}else{if(ah!=''){bv=new RegExp('<'+ae+'(?=[\\s>])[^>]*>','gi');K=K.replace(bv,gE);}}return K;}};var DLGTab={Click:function(cG,iH){if($("tab_nav_"+cG).className=="tab_on"){return;}var qf,dk,qL;for(var i=1;i<=iH;i++){qf="tab_nav_"+i;dk=$(qf).getAttribute("_content_id",2);if($(qf).className=="tab_on"){if(!DLGTab.hg){DLGTab.hg=new Array();}if(!DLGTab.hg[i]){DLGTab.hg[i]={Width:$("tabDialogSize").offsetWidth,Height:$("tabDialogSize").offsetHeight};}if(!DLGTab.fV){DLGTab.fV=new Array();}if(!DLGTab.fV[i]){DLGTab.fV[i]={Width:$(dk).offsetWidth,Height:$(dk).offsetHeight};}$(qf).className="tab_off";$(dk).style.display="none";}if(cG==i){qL=dk;}}$("tab_nav_"+cG).className="tab_on";$(qL).style.display="";try{lK(cG,iH,qL);}catch(e){}},kh:function(oj){var K='<table class=tab_layout1 border=0 cellpadding=0 cellspacing=0 width="100%"><tr><td>'+'<table class=tab_layout2 border=0 cellpadding=0 cellspacing=0><tr>'+'<td class=tab_begin></td>';for(var i=1;i<=oj.length;i++){var oq='tab_on';if(i>1){K+='<td class=tab_sep></td>';oq='tab_off';}K+='<td><table id="tab_nav_'+i+'" class="'+oq+'" _content_id="'+oj[i-1][1]+'" border=0 cellpadding=0 cellspacing=0><tr>'+'<td class=tab_left></td>'+'<td class=tab_center onclick="DLGTab.Click('+i+','+oj.length+')">'+oj[i-1][0]+'</td>'+'<td class=tab_right></td>'+'</tr></table></td>';}K+='</tr></table></td></tr></table>';document.write(K);}};var DLGMFU={Load:function(db,zu,eY,eJ,qv){if(this.yu){return;}this.vZ=db;this.pU=zu;this.xb=qv||'1';this.pU.style.width=eY;this.pU.style.height=eJ;if(t.bu){if(!fv(true)){this.rK(lang["DlgComNotice"]+"<br>"+lang["DlgComMFUMsgNotInstall"]);this.CheckInstalled();return;}this.ShowControl();}else{this.rK(lang["DlgComNotice"]+"<br>"+lang["MsgOnlyForIE"]);return;}},CheckInstalled:function(){if(!fv(false)){window.setTimeout("DLGMFU.CheckInstalled()",1000);}else{var K="<span class=red><b>"+lang["DlgComMFUMsgInstallOk"]+"</b></span><br><br><input type=button class='dlgBtn' value='"+lang["DlgComMFUMsgBtnOk"]+"' onclick='DLGMFU.ShowControl()'>";this.rK(K);}},rK:function(K){this.pU.innerHTML='<table border=0 cellpadding=0 cellspacing=5 width="100%" height="100%"><tr><td align=center valign=middle>'+'<table border=0 cellpadding=0 cellspacing=5>'+'<tr valign=top>'+'<td><img border=0 src="images/info.gif" align=absmiddle></td>'+'<td>'+K+'</td>'+'</tr>'+'</table>'+'</td></tr></table>';},ShowControl:function(){var kt,le;switch(this.vZ){case 'image':kt=config.AllowImageSize;le=config.AllowImageExt;break;case 'media':kt=config.AllowMediaSize;le=config.AllowMediaExt;break;case 'flash':kt=config.AllowFlashSize;le=config.AllowFlashExt;break;case 'file':kt=config.AllowFileSize;le=config.AllowFileExt;break;}var K='<table border=0 cellpadding=0 cellspacing=5 width="100%" height="100%" style="background-color:#d4d0c8">'+'<tr>'+'<td style="background-color:#808080;color:#ffffff;padding-left:5px;">'+lang['DlgComMFUMsgAllow'].replace('<ext>',le).replace('<size>',kt)+'</td>'+'</tr>'+'<tr>'+'<td height="100%">'+'<object id="eWebEditorMFU" classid="CLSID:D8653DCD-2DD5-4648-8498-09868D7AE9A0" codebase="eWebEditor3.CAB#version=3,2,0,0" width="100%" height="100%"></object>'+'</td>'+'</tr>'+'</table>';this.pU.innerHTML=K;eWebEditorMFU.Lang="zh-cn";eWebEditorMFU.Charset=config.Charset;eWebEditorMFU.SendUrl=O.SendUrl;eWebEditorMFU.BlockSize=config.MFUBlockSize;eWebEditorMFU.FileType=this.vZ;eWebEditorMFU.AllowSize=kt;eWebEditorMFU.AllowExt=le;if(this.xb=='0'){eWebEditorMFU.MultiFile=this.xb;}this.yu=true;}};