var OS="Win";var version="n";browserVer=navigator.appVersion;App=navigator.appName;var Version=browserVer.substring(0,1);var posOS=navigator.appVersion.indexOf("Mac");var posOS2=navigator.appVersion.indexOf("Win");if(posOS>=0){OS="Mac"}if((posOS<0)&&(posOS2>=0)){OS="Win"}if(App=="Netscape"&&Version>=3){version="n3"}var popupList=new Array();function openwin(C,J,E,I,G,D,H,K,F,B){mytop=Math.floor((screen.height/2)-(I/2));myleft=Math.floor((screen.width/2)-(E/2));var A;if(version!="n3"&&OS!="Mac"){A=window.open(C,J,"toolbar="+G+",width="+E+",height="+I+",directories="+D+",status="+H+",scrollbars="+K+",top="+mytop+",left="+myleft+",resizable="+F+",menubar="+B)}if(OS=="Mac"){A=window.open(C,J,"toolbar="+G+",width="+E+",height="+I+",directories="+D+",status="+H+",scrollbars="+K+",top="+mytop+",left="+myleft+",resizable="+F+",menubar="+B)}if(version=="n3"){A=window.open(C,J,"toolbar="+G+",width="+E+",height="+I+",directories="+D+",status="+H+",scrollbars="+K+",top="+mytop+",left="+myleft+",resizable="+F+",menubar="+B);A.focus()}popupList.push(A)}function closewindow(){for(var A=0;A<popupList.length;A++){if(popupList[A]&&popupList[A].open){popupList[A].close()}}}function popup(E,D,A){if(arguments.length>3){var B=arguments[3]}else{var B=1}var C=Math.round(Math.random()*10);debute=openwin(E,"popup"+C,D,A,0,0,1,0,1,0)}function launch(B,C,A){extension=B.substring(B.length-3,B.length);if(extension=="swf"){popup("/include/popup_flash.cfm?file="+B+"&width="+C+"&height="+A,C,A)}else{if(extension=="mov"){popup("/include/popup_quicktime.cfm?file="+B+"&width="+C+"&height="+A,C,A)}else{popup(B,C,A)}}}function check_email(A){email_type=/^[a-z0-9][a-z0-9_\.-]*@[a-z0-9][a-z0-9_\.-]*\.([a-z]{2}|com|org|net|mil|gov|edu|biz|info|name)$/i;if(!email_type.test(A)){return false}else{return true}}function check_alpha(A){if(A==""){return false}else{return true}}function charInString(B,A){for(i=0;i<A.length;i++){if(A.charAt(i)==B){return true}}return false}function isInteger(B){var A;for(A=0;A<B.length;A++){var C=B.charAt(A);if(((C<"0")||(C>"9"))){return false}}return true}function isIntegerInRange(D,B,A){if(!isInteger(D)){return false}var C=parseInt(D);return((C>=B)&&(C<=A))}function isYear(A){if(!isInteger(A)){return false}if(A.length==4&&(A>1900||A<2100)){return true}if(A.length==2){return isIntegerInRange(A,0,99)}}function isMonth(A){if(A.charAt(0)=="0"&&A.length>1){A=A.substring(1)}return isIntegerInRange(A,1,12)}function isDay(A){if(A.charAt(0)=="0"&&A.length>1){A=A.substring(1)}return isIntegerInRange(A,1,31)}function isDate(D){if(D.length==0){return false}var B=D.split("/");var A=B[0];var E=B[1];var C=B[2];return(isDay(A)*isMonth(E)*isYear(C))}function noenter(){return !(window.event&&window.event.keyCode==13)}function confirmdelete(A){userInput=confirm("Do you confirm \ndeleting this item?");if(userInput!=""&&userInput!=null){document.location.href=A}}function JSconfirm(A,B){userInput=confirm(A);if(userInput!=""&&userInput!=null){document.location.href=B}}function CheckFormEvent(){var A="";en=check_alpha(document.myForm.event_name_en.value)&&check_alpha(document.myForm.long_description_en.value);fr=check_alpha(document.myForm.event_name_fr.value)&&check_alpha(document.myForm.long_description_fr.value);if(check_alpha(document.myForm.contact_email.value)&&!check_email(document.myForm.contact_email.value)){A+="- Email contact\n"}if(A.length>0){A="Please check the following fields :\n"+A;alert(A);return false}else{return true;document.myForm.submit()}}function CheckFormReservation(){var A="";if(!isDate(document.myForm.start_date.value)){A+="- Start date\n"}if(check_alpha(document.myForm.start_time1.value)||check_alpha(document.myForm.start_time2.value)){if(!isIntegerInRange(document.myForm.start_time1.value,0,23)||!isIntegerInRange(document.myForm.start_time2.value,0,59)){A+="- Start time\n"}}if(!isDate(document.myForm.end_date.value)){A+="- Stop date\n"}if(check_alpha(document.myForm.end_time1.value)||check_alpha(document.myForm.end_time2.value)){if(!isIntegerInRange(document.myForm.end_time1.value,0,23)||!isIntegerInRange(document.myForm.end_time2.value,0,59)){A+="- Stop time\n"}}if(!check_alpha(document.myForm.event_title.value)){A+="- Title\n"}if(check_alpha(document.myForm.contact_email.value)&&!check_email(document.myForm.contact_email.value)){A+="- Email contact\n"}if(A.length>0){A="Please check the following fields :\n"+A;alert(A);return false}else{return true;document.myForm.submit()}}function CheckFormUser(){var A="";document.myForm.submit()}
function Combo(B,A,C){this.myCombo=B;this.myArrItems=A;this.mySelectedItems=C;this.update=function(){clearCombo(this.myCombo);this.myArrSelectedItems=this.mySelectedItems.value.split(",");for(var D=0;D<this.myArrSelectedItems.length;D++){fillCombo(this.myCombo,this.myArrSelectedItems[D],this.myArrItems[this.myArrSelectedItems[D]])}};this.update()}function clearCombo(B){for(var A=B.options.length-1;A>=0;A--){B.options[A]=null}B.selectedIndex=-1}function fillCombo(C,B,A){if(B!=""&&A!=""){C.options[C.options.length]=new Option(A,B)}}function printContent(B){if(document.getElementById(B)){var D="toolbar=yes,location=no,directories=yes,menubar=yes,";D+="scrollbars=yes,width=750,height=600,left=100,top=25";var C=document.getElementById(B).innerHTML;var A=window.open("","",D);A.document.open();A.document.write('<html><head><title>World Heritage Centre</title><LINK href=/styles/style_fonts.cfm rel=Stylesheet><style>table {border:1px;}</style></head><body style="background-color:#ffffff;"><span class="main_page">');A.document.write(C);A.document.write("</span></body></html>");A.document.close();A.focus()}}function VisibleId(B,D){if(document.getElementById&&document.getElementById(B)!=null){var A=(!D)?"hidden":"visible";var C=(!D)?"none":"block";document.getElementById(B).style.visibility=A;document.getElementById(B).style.display=C}}Array.prototype.push=function(){var B=this.length>>>0;for(var A=0;A<arguments.length;A++){this[B]=arguments[A];B=B+1>>>0}this.length=B;return B};Array.prototype.pop=function(){var B=this.length>>>0,A;if(B){A=this[--B];delete this[B]}this.length=B;return A};Array.prototype.clear=function(){var B=this.length>>>0;for(var A=0;A<B;A++){this[--this.length];delete this[A]}return this};var allDivsInPage=null;var allImagesInPage=null;var fExpandedAssistance=false;function f_display(A){if(document.layers){id_vis=(document.layers[A].display=="none")?"block":"none";document.layers[A].display=id_vis}else{if(document.all){id_vis=(document.all[A].style.display=="none")?"block":"none";document.all[A].style.display=id_vis}else{if(document.getElementById){id_vis=(document.getElementById(A).style.display=="none")?"block":"none";document.getElementById(A).style.display=id_vis}}}}function ExpandDiv(A){InitializeGlobalData();if(null==A||typeof (A)=="undefined"){return }var B=allDivsInPage[A];if(null==B||typeof (B)=="undefined"){return }B.style.display="block";var C=allImagesInPage[A+"_img"];if(null!=C&&typeof (C)!="undefined"){C.src="/graphics/icon_arrow_down.gif";C.alt="strHide"}}function CollapseDiv(A){InitializeGlobalData();if(null==A||typeof (A)=="undefined"){return }var B=allDivsInPage[A];if(null==B||typeof (B)=="undefined"){return }B.style.display="none";var C=allImagesInPage[A+"_img"];if(null!=C&&typeof (C)!="undefined"){C.src="/graphics/icon_arrow.gif";C.alt="strShow"}}function ToggleDiv(A){InitializeGlobalData();if(null==A||typeof (A)=="undefined"){return }var B=allDivsInPage[A];if(null==B||typeof (B)=="undefined"){return }if(B.style.display.toUpperCase()!="BLOCK"){ExpandDiv(A)}else{CollapseDiv(A)}}function AlterAllDivs(A){InitializeGlobalData();if(null==allDivsInPage||typeof (allDivsInPage)=="undefined"){return }if(typeof (allDivsInPage["divShowAll"])!="undefined"&&typeof (allDivsInPage["divHideAll"])!="undefined"){if(A=="block"){allDivsInPage["divShowAll"].style.display="none";allDivsInPage["divHideAll"].style.display="block"}else{allDivsInPage["divShowAll"].style.display="block";allDivsInPage["divHideAll"].style.display="none"}}AlterAllDivsSpans(document.body.getElementsByTagName("DIV"),A);AlterAllDivsSpans(document.body.getElementsByTagName("SPAN"),A)}function AlterAllDivsSpans(A,B){if(typeof (A)=="undefined"||null==A){return }for(i=0;i<A.length;i++){if(typeof (A[i])!="undefined"&&null!=A[i]&&typeof (A[i].id)!="undefined"&&null!=A[i].id&&A[i].id.length>0){if(0==A[i].id.indexOf("divExpCollAsst_")){var C=allImagesInPage[A[i].id+"_img"];if(B=="block"){A[i].style.display="block";if(typeof (C)!="undefined"&&null!=C){C.src="/graphics/icon_arrow_down.gif";C.alt="strHide"}}else{A[i].style.display="none";if(typeof (C)!="undefined"&&null!=C){C.src="/graphics/icon_arrow.gif";C.alt="strShow"}}}if(0==A[i].id.indexOf("divInlineDef_")){if(B=="block"){A[i].style.display="inline"}else{A[i].style.display="none"}}}}}function ToggleAllDivs(){InitializeGlobalData();if(fExpandedAssistance){AlterAllDivs("none")}else{AlterAllDivs("block")}fExpandedAssistance=!fExpandedAssistance}function ToggleAll(){InitializeGlobalData();ToggleAllDivs()}function InitializeGlobalData(){if("undefined"!=typeof (strRtl)){strIsRtl=strRtl}var B=document.body.getElementsByTagName("DIV");var A=document.body.getElementsByTagName("SPAN");var C=0;var D=0;if(typeof (B)!="undefined"&&null!=B){C=B.length}if(typeof (A)!="undefined"&&null!=A){D=A.length}allDivsInPage=new Array();for(i=0;i<C;i++){if(typeof (B[i].id)!="undefined"&&null!=B[i].id&&B[i].id.length>0){allDivsInPage[B[i].id]=B[i]}}for(i=0;i<D;i++){if(typeof (A[i].id)!="undefined"&&null!=A[i].id&&A[i].id.length>0){allDivsInPage[A[i].id]=A[i]}}allImagesInPage=document.body.getElementsByTagName("IMG")};addEvent(window,"load",sortables_init);var SORT_COLUMN_INDEX;function sortables_init(){if(!document.getElementsByTagName){return }tbls=document.getElementsByTagName("table");for(ti=0;ti<tbls.length;ti++){thisTbl=tbls[ti];if(((" "+thisTbl.className+" ").indexOf("tableaux")!=-1)&&(thisTbl.id)){ts_makeSortable(thisTbl)}}}function ts_makeSortable(E){if(E.rows&&E.rows.length>0){var F=E.rows[0]}if(!F){return }for(var D=0;D<F.cells.length;D++){var B=F.cells[D];var A=ts_getInnerText(B);if(D==0){var C="&darr;"}else{var C="&nbsp;"}B.innerHTML='<a href="#" title="Sort by '+A+'" class="sortheader" onclick="ts_resortTable(this, '+D+');return false;">'+A+'<span class="sortarrow">&nbsp;&nbsp;'+C+"</span></a>"}}function ts_getInnerText(D){if(typeof D=="string"){return D}if(typeof D=="undefined"){return D}if(D.innerText){return D.innerText}var E="";var C=D.childNodes;var A=C.length;for(var B=0;B<A;B++){switch(C[B].nodeType){case 1:E+=ts_getInnerText(C[B]);break;case 3:E+=C[B].nodeValue;break}}return E}function ts_resortTable(F,H){var J;for(var L=0;L<F.childNodes.length;L++){if(F.childNodes[L].tagName&&F.childNodes[L].tagName.toLowerCase()=="span"){J=F.childNodes[L]}}var A=ts_getInnerText(J);var B=F.parentNode;var C=H||B.cellIndex;var K=getParent(B,"TABLE");if(K.rows.length<=1){return }var G=ts_getInnerText(K.rows[1].cells[C]);sortfn=ts_sort_caseinsensitive;if(G.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)){sortfn=ts_sort_date}if(G.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)){sortfn=ts_sort_date}if(G.match(/^[£$]/)){sortfn=ts_sort_currency}if(G.match(/^[\d\.]+$/)){sortfn=ts_sort_numeric}SORT_COLUMN_INDEX=C;var D=new Array();var E=new Array();for(i=0;i<K.rows[0].length;i++){D[i]=K.rows[0][i]}for(j=1;j<K.rows.length;j++){E[j-1]=K.rows[j]}E.sort(sortfn);if(J.getAttribute("sortdir")=="down"){ARROW="&nbsp;&nbsp;&uarr;";E.reverse();J.setAttribute("sortdir","up")}else{ARROW="&nbsp;&nbsp;&darr;";J.setAttribute("sortdir","down")}for(i=0;i<E.length;i++){if(!E[i].className||(E[i].className&&(E[i].className.indexOf("sortbottom")==-1))){K.tBodies[0].appendChild(E[i])}}for(i=0;i<E.length;i++){if(E[i].className&&(E[i].className.indexOf("sortbottom")!=-1)){K.tBodies[0].appendChild(E[i])}}var I=document.getElementsByTagName("span");for(var L=0;L<I.length;L++){if(I[L].className=="sortarrow"){if(getParent(I[L],"table")==getParent(F,"table")){I[L].innerHTML="&nbsp;&nbsp;&nbsp;"}}}J.innerHTML=ARROW}function getParent(B,A){if(B==null){return null}else{if(B.nodeType==1&&B.tagName.toLowerCase()==A.toLowerCase()){return B}else{return getParent(B.parentNode,A)}}}function ts_sort_date(B,A){aa=ts_getInnerText(B.cells[SORT_COLUMN_INDEX]);bb=ts_getInnerText(A.cells[SORT_COLUMN_INDEX]);if(aa.length==10){dt1=aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2)}else{yr=aa.substr(6,2);if(parseInt(yr)<50){yr="20"+yr}else{yr="19"+yr}dt1=yr+aa.substr(3,2)+aa.substr(0,2)}if(bb.length==10){dt2=bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2)}else{yr=bb.substr(6,2);if(parseInt(yr)<50){yr="20"+yr}else{yr="19"+yr}dt2=yr+bb.substr(3,2)+bb.substr(0,2)}if(dt1==dt2){return 0}if(dt1<dt2){return -1}return 1}function ts_sort_currency(B,A){aa=ts_getInnerText(B.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,"");bb=ts_getInnerText(A.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,"");return parseFloat(aa)-parseFloat(bb)}function ts_sort_numeric(B,A){aa=parseFloat(ts_getInnerText(B.cells[SORT_COLUMN_INDEX]));if(isNaN(aa)){aa=0}bb=parseFloat(ts_getInnerText(A.cells[SORT_COLUMN_INDEX]));if(isNaN(bb)){bb=0}return aa-bb}function ts_sort_caseinsensitive(B,A){aa=ts_getInnerText(B.cells[SORT_COLUMN_INDEX]).toLowerCase();bb=ts_getInnerText(A.cells[SORT_COLUMN_INDEX]).toLowerCase();if(aa==bb){return 0}if(aa<bb){return -1}return 1}function ts_sort_default(B,A){aa=ts_getInnerText(B.cells[SORT_COLUMN_INDEX]);bb=ts_getInnerText(A.cells[SORT_COLUMN_INDEX]);if(aa==bb){return 0}if(aa<bb){return -1}return 1}function addEvent(E,D,B,A){if(E.addEventListener){E.addEventListener(D,B,A);return true}else{if(E.attachEvent){var C=E.attachEvent("on"+D,B);return C}else{alert("Handler could not be removed")}}};
function cleanForm(form_name,inputfieldsList){var valueArray = inputfieldsList.split(",");var tempvalue=new Array();var tempval = "";for(var i=0; i<valueArray.length; i++){tempvalue[i]=document.getElementById(valueArray[i]).value;	document.getElementById(valueArray[i]).onfocus=function(){tempval=this.value;this.value="";};document.getElementById(valueArray[i]).onblur=function(){if(this.value==""){this.value=tempval;}}}document.getElementById("formsearch").onsubmit=function(){for(var i=0; i<valueArray.length; i++){if(document.getElementById(valueArray[i]).value==tempvalue[i]){document.getElementById(valueArray[i]).value="";}}}}