/* CMSdragon 2008, powered by Alexander Shatalov http://cmsdragon.com 
	CMSDRAGON Global Scripts, all rigths reserved
*/
var is_ie=(navigator.userAgent.toLowerCase().indexOf('msie')!=-1),ns6=(document.getElementById&&!document.all);
try{var dT=0,dF=0,dO,oX,oY,iD,mouseX,mouseY,W,o,p='',loaded,key,ctrl,alt,temp,old,response,closed,kl=new Array(),stop_timer}catch(e){}
var aP=new Array();
function getElementById(id){if(document.getElementById(id)){return document.getElementById(id)}else if(document.all&&document.all[id]){return document.all[id]}else if(document.layers&&document.layers[id]){return (document.layers[id])}else{return false}}
function $(id){return getElementById(id)}
function getElementsByClass(c,n,t){var e=new Array();if(!n){n=document}if(!t){t='*'}var l=n.getElementsByTagName(t),p=new RegExp("(^|\\s)"+c+"(\\s|$)");for(i=0,j=0;i<l.length;i++){if(p.test(l[i].className)){e[j]=l[i];j++}}return e}
function url(u){if(SC.sitetype=='htaccess'){u=u.replace(/\?/g,'/').replace(/&/g,'/').replace(/=/g,'-')}else if(SC.sitetype=='popup'){u='popup.php'+u}return u}
function flash_play(ad,ct,w,h,r){var o='<object style="z-index:1;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+w+'" height="'+h+'"><param name="movie" value="'+ad+'?clickTAG='+ct+'"><param name="menu" value="false"><param name="allowScriptAccess" value="sameDomain" /><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+ad+'?clickTAG='+ct+'" menu="false" quality="high" wmode="transparent" allowScriptAccess="sameDomain" width="'+w+'" height="'+h+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>';if(r){return o}else{document.writeln(o)}}
function flash_show(u,w,h,r){var o='<object style="z-index:1;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+w+'" height="'+h+'"><param name="movie" value="'+u+'"><param name="menu" value="false"><param name="allowScriptAccess" value="sameDomain" /><param name="quality" value="high"><param name="wmode" value="transparent"><param name="wmode" value="transparent"><embed src="'+u+'" menu="false" quality="high" wmode="transparent" allowScriptAccess="sameDomain" width="'+w+'" height="'+h+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>';if(r){return o}else{document.writeln(o)}}
function download(path,file){var d=document.createElement('div');d.innerHTML=writeFrame(false,'download.php?path='+path+(file?'&file='+file:''),0,0,true);window.document.body.appendChild(d)}
/*Arrays*/
function in_array(v,a){for(i in a){if(a[i]==v){return true}}return false}
function rem_array(v,a){var x=v.indexOf('&.=');if(x){v=v.substring(0,x)}var n=new Array(),j=0;for(i=0;i<=a.length;i++){if(!a[i]||a[i]==v||v.indexOf(a[i])){continue}else{n[j]=a[i];j++}}return n}function qAP(node){if(!node){node=document}try{var p=new RegExp('popup_frame');var f=node.getElementsByTagName('DIV');for(i=f.length-1;i>=0;i--){if(p.test(f[i].className)&&f[i].style.display!='none'){f[i].style.display='none';closed=true;if(f[i].childNodes[0].src){aP=rem_array(f[i].childNodes[0].src,aP)}else{aP=rem_array(f[i].childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].src,aP)}break}}}catch(e){}}
function buildOptions(arr,sel,r){var h='';if(sel.indexOf('||')){sel=sel.split('||');var l=sel.length;var s=false;for(i in arr){s=false;for(j=0;j<l;j++){if(i&&sel[j]==i){s=true;break}}h+='<option value="'+i+'"'+(s?' selected="selected"':'')+'>'+arr[i]+'</option>'}}else{for(i in arr){h+='<option value="'+i+'"'+((i&&sel&&i==sel)?' selected="selected"':'')+'>'+arr[i]+'</option>'}}if(r){return h}else{document.writeln(h)}}
/*AHAH frames*/
function writeFrame(n,sr,w,h,r){if(!sr){sr='javascript:false;'}if(!w){w=0}if(!h){h=0}var f='<iframe'+(n?' id='+n+' name='+n:'')+' src='+sr+' rel=iframe allowtransparency=true style="overflow:hidden" frameborder=0 height='+h+' marginheight=0 marginwidth=0 width='+w+'></iframe>';if(r){return f}else{document.write(f)}return false}
function writeFrames(){writeFrame('frame_set');writeFrame('ajax_set');writeFrame('help_set');document.write('<div id="div_help" class="a_o" style="display:none"></div><div id="div_ajax" class="a_o" style="display:none"></div><div id="div_ajax2" class="a_o" style="display:none;z-index:14"></div><div id="div_ajax3" class="a_o" style="display:none;z-index:14"></div><div id="dragger" class="a_o" style="width:300px;display:none"></div><div id="ajax_loader" style="display:none;z-index:500;position:absolute"><img src="/images/sys/ajax/7.gif" align="absmiddle"></div>')}
/*Windows*/
function popup(l,w,h,fs,r){if(!w){w=640}if(!h){h=480}var ws=getWindowSize();if(w>=ws[0]){w=ws[0]}if(h>ws[1]-20){h=ws[1]-20}var c=cw(w,h,fs);if(fs){if(is_ie){FSwin(l);return false}w=c[3];h=c[4]}if(r){var u=l;var s='no'}else{var u=SC.domain+'/'+l;var s='yes'}var win=wino(u,l.replace(/[^A-Za-z0-9]/gi,''),'directories=no,statusbar=no,location=no,scrollbars='+s+',resizable=yes,width='+w+',height='+h+',top='+c[1]+',left='+c[2],w,h);if(win){setTimeout(function(){win.focus()},1000)}}
function addAtFocus(o,v){if(!o.style){o=$(o)}if(document.selection){o.focus();sel=document.selection.createRange().text=v}else if(o.selectionStart||o.selectionStart=='0'){o.value=o.value.substring(0,o.selectionStart)+v+o.value.substring(o.selectionEnd,o.value.length)}else{o.value+=v}}
function ajaxPopup(l,w,h,t){if(typeof(t)=='undefined'){t=(is_ie?SC.domain+'/':'')+l.substring(0,50)}if(is_ie&&in_array(l,aP)){return false}aP[aP.length]=l;if(!w||!h){var s=getWindowSize();w=s[0]-20;h=s[1]-10}else{var s=0;var c=cw2(w,h)}var b=window.document.body,d=document.createElement('div');d.className=' popup_frame a_o';d.style.position='absolute';d.style.zIndex=aP.length+30;d.style.top=(s?0:c[1])+'px';d.style.left=(s?5:c[2])+'px';if(w<400){var nO=false}else{var nO=true}d.innerHTML='<table style="margin:-6px 6px 6px -6px;border:1px solid #A4BACC;background:#FFF" cellpadding="0" cellspacing="0"><tr class="wintop" style="cursor:default" onMouseDown="mD(this.parentNode.parentNode.parentNode,'+nO+')" onDblClick="var e=this.parentNode.childNodes[1].childNodes[0];if(e.style.display==\'inline\'){this.parentNode.parentNode.style.width=this.offsetWidth;e.style.display=\'none\';this.src=\'/images/sys/rte-resize-down.gif\'}else{e.style.display=\'inline\';this.src=\'/images/sys/rte-resize-up.gif\'}"><td align="left">&nbsp;<img src="/images/16x16/photo_scenery.png" align="absmiddle"> '+t+'</td><td align="right"><img src="/images/sys/rte-resize-up.gif" onClick="var e=this.parentNode.parentNode.parentNode.childNodes[1].childNodes[0];if(e.style.display==\'inline\'){this.parentNode.parentNode.parentNode.parentNode.style.width=this.parentNode.parentNode.offsetWidth;e.style.display=\'none\';this.src=\'/images/sys/rte-resize-down.gif\'}else{e.style.display=\'inline\';this.src=\'/images/sys/rte-resize-up.gif\'}" style="cursor:pointer" align="absmiddle"> <img src="/images/sys/delete.gif" onClick="qAP()" style="cursor:pointer" align="absmiddle"></td></tr><tr><td colspan="2" style="display:inline">'+writeFrame(false,l,w,h,true)+'</td></tr></table>';b.appendChild(d)}
function ViewImage(f,x,y,t){var w=window.open('','imageviewer','width='+x+',height='+y+',menubar=no,toolbar=no');w.document.open();w.document.write('<html><head><title>'+t+'</title></head><body><div style="position:absolute;width:'+x+'px; height:'+y+'px;left:0px;top:0px"><a href="javascript:void(0)" onclick="self.close()"><img src='+f+' border="0"></a></div></body></html>');w.document.close()}
function FSwin(l){w=window.open(SC.domain+'/'+l,'','fullscreen=yes,directories=no,resizable=yes,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes');w.focus()}
function kill(f,e){var l=f.elements.length;if(!l){return false}for(n=0;n<l;n++){if((f.elements[n].type=='select-one'||f.elements[n].type=='select-multiple')&&f.elements[n].selectedIndex&&f.elements[n].value==''){continue}if(!e&&(f.elements[n].value==''||f.elements[n].value=='0')&&f.elements[n].type!='hidden'){kl[kl.length]=f.elements[n];f.elements[n].disabled=true}else if(e&&f.elements[n].type=='text'){f.elements[n].value=''}}}
function dekill(){if(kl.length){for(i=0;i<kl.length;i++){try{window.parent.kl[i].disabled=false}catch(e){}}}}
function getWindowSize(){var w,h;if(window.innerWidth){w=window.innerWidth}else if(document.documentElement&&document.documentElement.clientWidth){w=document.documentElement.clientWidth}else if(document.body){w=document.body.clientWidth}if(window.innerHeight){h=window.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){h=document.documentElement.clientHeight}else if(document.body){h=document.body.clientHeight}return[parseInt(w),parseInt(h)]}
function cwn(){var sW=1024,sH=800;if(parseInt(navigator.appVersion)>3){sW=screen.width;sH=screen.height}else if(navigator.appName=='Netscape'&&parseInt(navigator.appVersion)==3&&navigator.javaEnabled()){var j=java.awt.Toolkit.getDefaultToolkit();var jss=j.getScreenSize();sW=jss.width;sH=jss.height}return[parseInt(sW),parseInt(sH)]}
function cw(w,h,fs){var c=cwn();var sc='no',t=0,l=0;if(fs){return[true,0,0,c[0],c[1]]}if(h>c[1]||w>c[0]){l=0;t=0;sc='yes'}else{t=(c[1]-h)/2-20;l=(c[0]-w)/2-20}if(t<0){t=0}if(l<0){l=0}if(w>c[0]){w=c[0]-17}if(h>c[1]){h=c[1]-80}return [sc,t,l,w,h]}
function cw2(w,h,fs){var ws=getWindowSize();var c=cwn();var s='no',t=0,l=0;if(fs){return[true,0,0,c[0],c[1]]}if(h>c[1]||w>c[0]){s='yes'}else{t=(mouseY*2-h)/2-20;l=(mouseX*2-w)/2-20}if(l+w+20>ws[0]){l=ws[0]-w-20}else if(l<0){l=0}if(t<10){t=10}if(t<getTop()){t=getTop()+5}return [s,t,l]}	
function ShowPicture(img,w,h,title,type,file){if(!w){w=640}else{w=parseInt(w)}if(!h){h=480}else{h=parseInt(h)}if(!file){file='photo'}if(!title){title='Picture'}if(!type){type='i'}if(h>10&&h<1000&&w<1000&&SC.sitetype!='im'){ajaxPopup('/'+file+'.php?'+type+'='+img+'&t='+title,w,h,title)}else{var c=cw(w,h);var win=window.open(SC.domain+'/'+file+'.php?'+type+'='+img+'&t='+title+'&width='+w+'&height='+h,img.replace(/[^A-Za-z0-9]/gi,''),'toolbar=0,status=0,menubars=0,scrollbars='+c[0]+',resizable,location=0,directories=0,width='+c[3]+',height='+c[4]+',top='+c[1]+',left='+c[2]);win.focus()}}
function wino(u,n,s,w,h){if(ctrl){return ajaxPopup(u,w,h,n)}else{return window.open(u,n,s)}}
function getTop(){return window.pageYOffset||document.documentElement.scrollTop||0}
/*Forms*/
function Check(c,n,ms){s=0;for(i=0;i<c;i++){if($(n+i).checked){s++}}if(s==ms){for(i=0;i<c;i++){if(!$(n+i).checked){$(n+i).disabled=true}}}else{for(i=0;i<c;i++){$(n+i).disabled=false}}}
function enableButtons(){var b=window.document.getElementsByTagName('BUTTON');for(i=0;i<b.length;i++){b[i].disabled=false;b[i].outerHTML=b[i].outerHTML}}
function submit(fm){if(fm){window.document.forms[fm].submit()}else{submit()}}
function delaySubmit(f,b){if(f&&dF){clearTimeout(dT);dF=0;delaySubmit(f)}else if(dF){if(SC.sitetype=='ajax'){post(dF)}else{dF.submit();clearTimeout(dT);p.outerHTML='<img src="/images/sys/uploadprogressbar.gif" width="'+(p.style.width?p.style.width:170)+'">'}}else{dF=f;p=b;dT=setTimeout("delaySubmit(0)",1000)}}
function Timer(i,sec,u,func){if(stop_timer){window.status='';return false}if(i>=sec){eval(func+"('"+u+"')");return 1}window.status=(sec-i)+' seconds left..';i++;window.setTimeout("Timer("+i+","+sec+",'"+u+"','"+func+"')",1000)}
/*QuickPrint*/
function printdiv(id,p,title){if(!title){title=window.document.title}var d=getElementsByClass('noprint',$(id));for(i=0;i<d.length;i++){d[i].style.display='none'}var html=$(id).outerHTML;if(!html){html=$(id).innerHTML}for(i=0;i<d.length;i++){d[i].style.display=''}var s=cw(800,600,false);var w=window.open('','Print_'+Math.floor(Math.random()*1000),'scrollbars=yes,resizable=yes,width=800,height=600,menubar=no,top='+s[1]+',left='+s[2]+',toolbar=no');w.document.open();var h='<html><head><title>'+title+'</title><script type="text/javascript" src="/js/'+SC.template+'.js"></script></head><body>';for(i=0;i<SC.sitecss.length;i++){h +='<link href="/'+SC.sitecss[i]+'" rel="stylesheet" type="text/css">'}h+='<div align="center">'+html+'</div>';if(!p){h+='<div align="right" style="padding-right:10px"><a href="javascript://" onClick="this.style.display=\'none\';window.print()"><img src="/images/sys/e_print_edit.gif" alt="Print?"></a>'}h+='</body></html>';w.document.write(h);w.document.close();if(p){w.print()}}
/*COOKIE*/
var Cookie={set:function(n,v,e,p,d,s){var t=new Date();t.setTime(t.getTime());if(e){e=e*86400000}var ed=new Date(t.getTime()+e);document.cookie=n+'='+escape(v)+(e?';expires='+ed.toGMTString():'')+(p?';path='+p:'')+(d?';domain='+d:'')+(s?';secure':'')},get:function(n){var ac=document.cookie.split(';'),f='',v='',t='',c='';for(i=0;i<ac.length;i++){t=ac[i].split('=');c=ac[0].replace(/^\s+|\s+$/g,'');if(n==c){return unescape(t[1].replace(/^\s+|\s+$/g,''))}}return null},del:function(n,p,d){if(this.get(n)){document.cookie=n+'='+(p?';path='+p:'')+(d?';domain='+d:'')+';expires=Thu, 01-Jan-1970 00:00:01 GMT'}}}
function clock(o){var d=new Date();var m=d.getMonth()+1,ds=d.getDate(),h=d.getHours(),m=d.getMinutes(),s=d.getSeconds();if(monts<10){m='0'+m}if(days<10){ds='0'+d}if(hours<10){h='0'+h}if(mins<10){m='0'+m}if(secs<10){s='0'+s}o.innerHTML=monts+' / '+days+' / '+d.getYear()+'<br />'+hours+':'+mins+':'+secs;setTimeout("clock()",1000)}