
var savedModalTitle='';function ajax_load(url)
{var http_request=null;var d=new Date();if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType)http_request.overrideMimeType('text/html');}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!http_request){document.cursor='default';return('ERROR');}
http_request.open('GET',url,false);http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");http_request.send(null);document.cursor='default';return(http_request.status==200?http_request.responseText:'');}
var SavedIFrameDoc;function GetRSIFrame(){if(!SavedIFrameDoc&&document.createElement){var tempIFrame=document.createElement('iframe');tempIFrame.setAttribute('id','RSIFrame');tempIFrame.style.border='0px';tempIFrame.style.width='0px';tempIFrame.style.height='0px';IFrameObj=document.body.appendChild(tempIFrame);if(document.frames){IFrameObj=document.frames['RSIFrame'];}}
if(!IFrameObj&&document.createElement){try{}catch(exception){iframeHTML='\<iframe id="RSIFrame" style="';iframeHTML+='border:0px;';iframeHTML+='width:0px;';iframeHTML+='height:0px;';iframeHTML+='"><\/iframe>';document.body.innerHTML+=iframeHTML;IFrameObj=new Object();IFrameObj.document=new Object();IFrameObj.document.location=new Object();IFrameObj.document.location.iframe=document.getElementById('RSIFrame');IFrameObj.document.location.replace=function(location){this.iframe.src=location;}}}
if(navigator.userAgent.indexOf('Gecko')!=-1&&!IFrameObj.contentDocument){setTimeout('GetRSIFrame()',10);return false;}
if(IFrameObj.contentDocument){SavedIFrameDoc=IFrameObj.contentDocument;}else if(IFrameObj.contentWindow){SavedIFrameDoc=IFrameObj.contentWindow.document;}else if(IFrameObj.document){SavedIFrameDoc=IFrameObj.document;}else{return true;}
return SavedIFrameDoc;}var fieldsAreDisabled=false;function ShowForgetPassword()
{if(fieldsAreDisabled==true)return false;var objFPP=document.getElementById('forgetPasswordPanel');var objLP=document.getElementById('loginPanel');var login=document.f.txbLogin.value;if(objFPP!==null)objFPP.style.display='block';if(objLP!==null)objLP.style.display='none';document.f.txbEmail2.value=login;document.f.btnLogin_clicked.value='0';document.f.txbEmail2.focus();}
function ShowRegistration()
{if(fieldsAreDisabled==true)return false;var objRP=document.getElementById('registrationPanel');var objRIP=document.getElementById('regInfoPanel');if(objRP!==null)objRP.style.display='block';if(objRIP!==null)objRIP.style.display='none';document.f.txbEmail.focus();}
function ShowRegistrationOk(argEmail,argMessage)
{var objRP=document.getElementById('registrationPanel');var objROP=document.getElementById('registrationOkPanel');var objFPP=document.getElementById('forgetPasswordPanel');var objLP=document.getElementById('loginPanel');var objErr1=document.getElementById('errorMessage1');var objErr2=document.getElementById('errorMessage2');SetFieldsToDisabled(false);if(objRP!==null)objRP.style.display='none';if(objROP!==null)objROP.style.display='block';if(objFPP!==null)objFPP.style.display='none';if(objLP!==null)objLP.style.display='block';if(objErr1!=null){if(argMessage!='')objErr1.innerHTML=argMessage;else objErr1.innerHTML='&nbsp;';}
if(objErr2!=null)objErr2.innerHTML='&nbsp;';document.f.txbLogin.value=argEmail;document.f.txbPassword.focus();}
function SignIn()
{var objErr=document.getElementById('errorMessage1');if(objErr!=null)objErr.innerHTML='<img src="images/ajax-loader2.gif">';document.f.btnSend_clicked.value='0';document.f.btnReg_clicked.value='0';document.f.btnLogin_clicked.value='1';document.f.submit();SetFieldsToDisabled(true);}
function SendEmail()
{var objErr=document.getElementById('errorMessage1');if(objErr!=null)objErr.innerHTML='<img src="images/ajax-loader2.gif">';document.f.btnSend_clicked.value='1';document.f.btnLogin_clicked.value='0';document.f.btnReg_clicked.value='0';document.f.submit();SetFieldsToDisabled(true);}
function CreateAccount()
{var objErr=document.getElementById('errorMessage2');if(objErr!=null)objErr.innerHTML='<img src="images/ajax-loader2.gif">';if(CheckEmail(document.f.txbEmail.value)){document.f.btnReg_clicked.value='1';document.f.btnSend_clicked.value='0';document.f.btnLogin_clicked.value='0';document.f.submit();SetFieldsToDisabled(true);}else ShowError('errorMessage2',invalidEmailMessage,false)}
function CheckEmail(argEmail)
{var reg=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;return reg.test(argEmail);}
function ShowError(argName,argErrorMessage,arrInvalidFields)
{var objErr=document.getElementById(argName);if(objErr!=null)objErr.innerHTML=argErrorMessage;SetFieldsToDisabled(false);if(arrInvalidFields!==false){var objFie;if(arrInvalidFields.length!==null){for(i=0;i<arrInvalidFields.length;i++){objFie=document.getElementById(arrInvalidFields[i]);if(objFie!==null)objFie.className='error';}}}}
function SetFieldsToDisabled(argState)
{var arrFields=new Array('txbEmail','txbEmail2','oplCountries','btnLogin','btnSend','btnReg','txbPassword');var objFie;var objRP=document.getElementById('registrationPanel');var objLP=document.getElementById('loginPanel');var objFPP=document.getElementById('forgetPasswordPanel');fieldsAreDisabled=argState;for(i=0;i<arrFields.length;i++){objFie=document.getElementById(arrFields[i]);if(objFie!==null)objFie.disabled=argState;}
if(objRP!=null){if(argState==true)objRP.className='fadeit';else objRP.className='';}
if(objFPP!=null){if(argState==true)objFPP.className='fadeit';else objFPP.className='';}
if(objLP!=null){if(argState==true)objLP.className='fadeit';else objLP.className='';}
if(argState==true){objFie=document.getElementById('btnLogin_clicked');if(objFie!==null)objFie.value='';objFie=document.getElementById('btnReg_clicked');if(objFie!==null)objFie.value='';objFie=document.getElementById('btnSend_clicked');if(objFie!==null)objFie.value='';objFie=document.getElementById('btnSend_clicked');if(objFie!==null)objFie.value='';}}
function CheckEnter(e){var characterCode;if(e&&e.which){e=e;characterCode=e.which;}else{e=event;characterCode=e.keyCode;}
if(characterCode==13)return true;return false;}
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;function printSpecial()
{if(document.getElementById!=null)
{var html='<HTML><HEAD>';var printreadyElem=document.getElementById("printready");if(printreadyElem!=null)
{var headTags=document.getElementsByTagName("head");if(headTags.length>0){html+=headTags[0].innerHTML;var r=headTags[0].innerHTML.match(/[^\'\"\=]+\.css/);if(r){if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType)http_request.overrideMimeType('text/css');}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){r=0;}}}else r=0;if(r){http_request.open('GET',r,false);http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");http_request.send(null);html+=(http_request.status==200?"\n<STYLE type='text/css'>\n"+http_request.responseText+'\n</STYLE>\n':'');}}}
html+='</HE'+'AD><BOD'+'Y leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" rightmargin="20" bottommargin="20" onload="setTimeout(\'window.print();\',100);">';html+=printreadyElem.innerHTML;}
else
{alert("Az oldalnak nem létezik nyomtatható verziója!\nCould not find the printable version of this page");return;}
html+='</BO'+'DY></HT'+'ML>';var printWin=window.open("","printSpecial","width=950, height=650, menubar=1, toolbar=1, location=0,status=0,scrollbars=1");printWin.document.open();printWin.document.write(html);printWin.document.close();}}
function PrintMail(argName)
{document.write('<A href="mailto:'+argName+'@cmas.org">'+argName+'@cmas.org</A>');}
var loading=false;var loadingCount=0;function ShowFederationDetails(argId,argObjRow)
{if(loading==true)return false;if(!document.createElement){return true};loading=true;var obj=document.getElementById('fed'+argId)
var currentTime=new Date()
var url=location.href;if(location.href.lastIndexOf('?')>0)url=url.substring(0,location.href.lastIndexOf('?'));if(obj!==null){if(obj.style.display=='block'){obj.style.display='none';loading=false;if(argObjRow!==false)argObjRow.className=argObjRow.className.replace('active','');}else{IFrameDoc=GetRSIFrame();if(argObjRow!==false)argObjRow.className+=' active';obj.style.display='block';obj.innerHTML='<img src="images/document_tree_loader.gif" class=\"preloader\">';IFrameDoc.location.replace(url+'?id='+argId+'t='+currentTime.getTime());setTimeout('SetFederationDetails(\''+argId+'\')',200);}}}
function SetFederationDetails(argId)
{var IFrameDoc=GetRSIFrame();var obj=document.getElementById('fed'+argId)
loadingCount++;if(IFrameDoc!==null){var contentObj=IFrameDoc.getElementById('federation');if(contentObj!==null){var html=IFrameDoc.getElementById('federation').innerHTML;if(html!='')obj.innerHTML=html;loading=false;return true;}}
if(loadingCount<100)setTimeout('SetFederationDetails(\''+argId+'\')',200);}
function GetScrollTop()
{var scrollTop=document.body.scrollTop;if(scrollTop==0){if(window.pageYOffset)scrollTop=window.pageYOffset;else scrollTop=(document.body.parentElement)?document.body.parentElement.scrollTop:0;}
return scrollTop;}
function ShowGalleriesDetails(argGroupId)
{if(loading==true)return false;if(argGroupId==undefined)return false;loading=true;var obj=document.getElementById('gal'+argGroupId)
if(obj!==null){if(obj.style.display=='block'){obj.style.display='none';loading=false;}else{obj.style.display='block';}}
var curtop=0;var detailsObj=obj;if(detailsObj.offsetParent)
while(1){curtop+=detailsObj.offsetTop;if(!detailsObj.offsetParent)break;detailsObj=detailsObj.offsetParent;}
else if(detailsObj.y)curtop+=detailsObj.y;curtop=curtop-50;if(curtop<0)curtop=0;var scrollTop=document.body.scrollTop;if(scrollTop<curtop)ScrollTo(curtop,'down',1);else if(scrollTop>0)ScrollTo(curtop,'up',1);for(i=1;i<100;i++){obj=document.getElementById('th_'+argGroupId+'-'+i);if(obj===null)break;obj.style.backgroundImage='url('+obj.name+')';}
loading=false;}
function ScrollTo(argTo,argArrow,argStep)
{scrollTop=GetScrollTop();if(argStep<30){if(argArrow=='down'){if(scrollTop>argTo)window.scrollTo(0,argTo);else{window.scrollTo(0,scrollTop+40);setTimeout('ScrollTo('+argTo+', "down", '+(argStep+1)+')',5);}}
if(argArrow=='up'){if(scrollTop<argTo)window.scrollTo(0,argTo);else{window.scrollTo(0,scrollTop-40);setTimeout('ScrollTo('+argTo+', "up", '+(argStep+1)+')',5);}}}}
function GetURLParameter(argParameterName){var queryString=window.top.location.search.substring(1);var argParameterName=argParameterName+"=";if(queryString.length>0){begin=queryString.indexOf(argParameterName);if(begin!=-1){begin+=argParameterName.length;end=queryString.indexOf("&",begin);if(end==-1){end=queryString.length}
return unescape(queryString.substring(begin,end));}
return'';}}
function ShowGoogleMap(argLat,argLong)
{var layer2=document.getElementById('fadeLayer');var layer3=document.getElementById('googleMapContainer');var layer4=document.getElementById('googleMap');layer2.style.display='block';layer3.style.display='block';if(window.innerHeight&&window.scrollMaxY)var height=window.innerHeight+window.scrollMaxY;else if(document.body.scrollHeight>document.body.offsetHeight)var height=document.body.scrollHeight;else var height=yWithScroll=document.body.offsetHeight;layer2.style.height=height+'px';layer4.innerHTML='<img src="images/document_tree_loader.gif" class=\"preloader\">';setTimeout('LoadGoogleMap('+argLat+', '+argLong+')',400);}
function LoadGoogleMap(argLat,argLong)
{if(GBrowserIsCompatible()){var map=new GMap2(document.getElementById("googleMap"));map.setCenter(new GLatLng(argLat,argLong),10);map.setUIToDefault();map.setMapType(G_NORMAL_MAP);var point=new GLatLng(argLat,argLong);map.addOverlay(new GMarker(point));}}
function CloseGoogleMap()
{var layer2=document.getElementById('fadeLayer');var layer3=document.getElementById('googleMapContainer');layer3.style.display='none';layer2.style.display='none';}
function DivingCenters(argContinent)
{document.location.href=divingCentersURL+'?continent='+argContinent;}
function ShowContinentOnMap(argContinent)
{var obj=document.getElementById('continent');if(argContinent!='')obj.className='continent_'+argContinent;else obj.className='continent_off';}
var clickedLinkObj=false;var language=1;var documentAreaReadURL='';var objDialogWindow=null;var fClosed=false;function OpenDialogWindow(iWidth,iHeight,URL)
{var iLeft=window.screen.width/2-iWidth/2;var iTop=window.screen.height/2-iHeight/2-25;if(objDialogWindow!=null)
{if(!objDialogWindow.closed)
{objDialogWindow.close();while(fClosed!=objDialogWindow.closed)
{fClosed=objDialogWindow.closed;}}}
objDialogWindow=window.open(URL,"_blank",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width='+iWidth+',height='+iHeight+',screenX='+iLeft+',screenY='+iTop+',left='+iLeft+',top='+iTop);}
var dt_nodeName=false;var dt_language=1;function DT_ChangeTreeNode(argNodeName,argLanguage,argLinkObj)
{var objNode=document.getElementById(argNodeName);var objQuery=document.getElementById('txbQuery');var btnSearch=document.getElementById('btnSearch');if(objNode===null)return false;if(argLinkObj!=false)clickedLinkObj=argLinkObj;objQuery.disabled=true;btnSearch.disabled=true;dt_language=argLanguage;dt_nodeName=argNodeName;if(objNode.style.display=='block'){objNode.style.display='none';if(argLinkObj!==null)argLinkObj.className='closed_dir';}else{objNode.style.display='block';objNode.innerHTML='<img src="images/document_tree_loader.gif" class=\"preloader\">';setTimeout('LoadNoteContent(\''+argNodeName+'\',\'\',\'1\')',200);if(argLinkObj!==null)argLinkObj.className='opened_dir';}}
function DT_Search(argNodeName,argLanguage)
{var objNode=document.getElementById(argNodeName);var objQuery=document.getElementById('txbQuery');var btnSearch=document.getElementById('btnSearch');if(objNode===null)return false;if(objQuery===null)return false;if(argLanguage!=0)dt_language=argLanguage;if(argNodeName!='')dt_nodeName=argNodeName;objQuery.disabled=true;btnSearch.disabled=true;objNode.style.display='block';objNode.innerHTML='<img src="images/document_tree_loader.gif" class=\"preloader\">';setTimeout('LoadNoteContent(\''+dt_nodeName+'\',\''+objQuery.value+'\',\'1\')',200);}
function DT_SearchPaging(argPage)
{var objNode=document.getElementById(dt_nodeName);var objQuery=document.getElementById('txbQuery');var btnSearch=document.getElementById('btnSearch');if(objQuery===null)return false;objQuery.disabled=true;btnSearch.disabled=true;objNode.innerHTML='<img src="images/document_tree_loader.gif" class=\"preloader\">';setTimeout('LoadNoteContent(\''+dt_nodeName+'\',\''+objQuery.value+'\',\''+argPage+'\')',200);}
function LoadNoteContent(argNodeName,argQuery,argPage)
{var objNode=document.getElementById(argNodeName);var objQuery=document.getElementById('txbQuery');var btnSearch=document.getElementById('btnSearch');if(objNode===null)return false;var html=ajax_load(documentAreaReadURL+'?sessionId='+sessionId+'&dirId='+argNodeName+'&language='+dt_language+'&query='+argQuery+'&page='+argPage);if(html=='none'){objNode.style.display='none';if(clickedLinkObj!==false)clickedLinkObj.className='closed_dir';}
else objNode.innerHTML=html;objQuery.disabled=false;btnSearch.disabled=false;}
function DirAdmin(argDirId){OpenDialogWindow(790,400,'admin/document_edit.php?sessionId='+sessionId+'&txbDirId='+argDirId);}
function CheckPasswords()
{var objP1=document.getElementById('newpassword1');var objP2=document.getElementById('newpassword2');var objB=document.getElementById('btnChangePassword');objP1.className='pipe_invalid';objP2.className='pipe_invalid';objB.disabled=true;if(document.f.txbNewPassword1.value.length>5)objP1.className='pipe_valid';if((document.f.txbNewPassword2.value.length>5)&&(document.f.txbNewPassword1.value==document.f.txbNewPassword2.value)){objP2.className='pipe_valid';objB.disabled=false;}}
var sessionId='';
function SetSessionId(argSessionId,argCookieName){}
function toggleBox(obj){el=document.getElementById(obj);if(el.className=='text'){el.className+=' closed';}
else{to=el.className.indexOf(' closed');el.className=el.className.substring(0,to);}}
function showChampionshipResults(argRow,argDivId,argURL)
{var div=document.getElementById('ch'+argDivId);argRow.className='galleriesrow highlight';if(div!=null){if(div.style.display!='block'){div.style.display='block';div.innerHTML='<img src="images/ajax-loader.gif" />';setTimeout("loadChampionshipResults('"+argDivId+"','"+argURL+"')",100);}}}
function loadChampionshipResults(argDivId,argURL)
{var div=document.getElementById('ch'+argDivId);if(div!=null){var html=ajax_load(argURL+'&getResults=1');div.innerHTML=html;}}
function toggleLangs(el){var langs=document.getElementById('langLinks');if(langs!==null){if(langs.style.display==''){langs.style.display='block';el.parentNode.style.background='#e0dddd';}
else{langs.style.display='';el.parentNode.style.background='';}}}
function showDetails(argLink)
{var modal=document.getElementById('modalWindow');var box=document.getElementById('modalWindow');var title=document.getElementById('modalTitle');var inner=document.getElementById('modalInner');var scrollTop=filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0);title.innerHTML=argLink.title;inner.innerHTML='<p>Loading details...</p>';modal.style.top=(20+scrollTop)+'px';html=ajax_load(argLink.href);inner.innerHTML=html;objText=document.getElementById('simplePageText');if(objText!=null)inner.innerHTML='<div class="rightCol">'+objText.innerHTML+'</div>';inner.style.height='400px';inner.scrollTop=0;modal.style.display='block';return false;}
function closeModalWindow()
{var modal=document.getElementById('modalWindow');modal.style.display='none';}
function filterResults(n_win,n_docel,n_body){var n_result=n_win?n_win:0;if(n_docel&&(!n_result||(n_result>n_docel)))
n_result=n_docel;return n_body&&(!n_result||(n_result>n_body))?n_body:n_result;}
function setCookie(name,value,expires,path,domain,secure)
{}
function refreshWebCamVisitors(){
    var obj = document.getElementById('webcamlog');    var count = ajax_load('http://www.cmas.org/_webcamlog.php');    obj.innerHTML = 'The number of viewers: '+count; setTimeout('refreshWebCamVisitors()', 10000);
}
