﻿var ns = (document.layers) ? true : false;var ie = (document.all) ? true : false;var ie6 = navigator.userAgent.indexOf("MSIE 6.0;") != -1;function trim(str) {return str.replace(/^\s+|\s+$/g, "");}function clearInputs(objid) {var i = 0;var obj = document.getElementById(objid).getElementsByTagName("input");for (i = 0; i < obj.length; i++) {if (obj[i].type == "text") {obj[i].value = "";}}obj = document.getElementById(objid).getElementsByTagName("select");for (i = 0; i < obj.length; i++) {obj[i].selectedIndex = 0;}obj = document.getElementById(objid).getElementsByTagName("textarea");for (i = 0; i < obj.length; i++) {obj[i].value = "";}obj = document.getElementById(objid).getElementsByTagName("span");for (i = 0; i < obj.length; i++) {if (obj[i].className == "labelText" ||obj[i].className == "textomsg") {obj[i].innerHTML = "";}}}function validtext_empty(controlID, msg) {var obj = document.getElementById(controlID);if (obj == null) {return true;}obj.value = trim(obj.value);if (obj.value == "") {alert(msg);try {obj.focus();} catch (e) {i = 0;}return false;}return true;}function validtext_drop(controlID, msg, initialValue) {var obj = document.getElementById(controlID);if (obj == null) {return true;}if (trim(obj.value) == initialValue) {alert(msg);obj.focus();return false;}return true;}function validtext_email(controlID, msg) {var obj = document.getElementById(controlID);if (obj == null) {return true;}var myregexp = new RegExp("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");obj.value = trim(obj.value);if (obj.value == "") {return true;}if (myregexp.exec(obj.value) == null) {alert(msg);obj.focus();return false;}return true;}function generateGuid() {var result, i, j;result = "";for (j = 0; j < 32; j++) {if (j == 8 || j == 12 || j == 16 || j == 20) {result = result + "-";}i = Math.floor(Math.random() * 16).toString(16).toUpperCase();result = result + i;}return result;}function show_hideLigthBoxMsg(id, op) {if (op) {document.getElementById("fade").className = "black_overlay";document.getElementById(id).style.display = "block";document.getElementById("fade").style.display = "block";} else {document.getElementById(id).style.display = "none";document.getElementById("fade").style.display = "none";}}function getPageName() {var url = window.location.href;var i = url.lastIndexOf("/") + 1;var name = url.substring(i);if (name.indexOf("?") != -1) {name = name.substring(0, name.indexOf("?"));}return name;}function doGetHtmlAjax(url, params) {var request = GXmlHttp.create();request.open("GET", url + "?" + params, true);request.onreadystatechange = (function () {if (request.readyState == 4) {return request.responseText;} else {return "";}});request.send(null);}function DoCrossRequestV2(url) {var head = document.getElementsByTagName("head").item(0);var script = document.createElement("script");var xurl = url + "&map=" + getPageName() + "&c=" + Math.random();script.setAttribute("src", xurl);script.setAttribute("type", "text/javascript");head.appendChild(script);return true;}function topRoundDiv() {var str;if (!ie6) {str = "<div class=\"rounded-box\"><div style=\"overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 0px; top: 0px;\"><img style=\"border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: 0px; top: 0px; width: 690px; height: 786px; -moz-user-select: none;\" src=\"http://maps.google.com/intl/en_ALL/mapfiles/iw3.png\"/></div><div style=\"overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 0px;bottom: 0px;\"><img style=\"border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: 0px; top: -665px; width: 690px; height: 786px; -moz-user-select: none;\" src=\"http://maps.google.com/intl/en_ALL/mapfiles/iw3.png\"/></div><div style=\"overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 305px; top: 0px;\"><img style=\"border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: -665px; top: 0px; width: 690px; height: 786px; -moz-user-select: none;\" src=\"http://maps.google.com/intl/en_ALL/mapfiles/iw3.png\"/></div><div style=\"overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 305px; bottom:0px;\"><img style=\"border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: -665px; top: -665px; width: 690px; height: 786px; -moz-user-select: none;\" src=\"http://maps.google.com/intl/en_ALL/mapfiles/iw3.png\"/></div><div style=\"border-top: 1px solid rgb(171, 171, 171); position: absolute; left: 25px; top: 0px; width: 280px; height: 25px; background-color: white;\"></div><div style=\"border-bottom: 1px solid rgb(171, 171, 171); position: absolute; left: 25px; bottom: 0px; width: 280px; height: 25px; background-color: white;\"></div><div style=\"border-left: 1px solid rgb(171, 171, 171); border-right: 1px solid rgb(171, 171, 171); position: absolute; left: 0px; top: 25px; width: 328px; height: 270px; background-color: white;\"/><div class=\"box-contents\">";} else {str = "<div class=\"rounded-box\"><div style=\"overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 0px; top: 0px;\"><div style=\"border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: 0px; top: 0px; width: 690px; height: 786px; -moz-user-select: none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://maps.google.com/intl/en_ALL/mapfiles/iw3.png',sizingMethod='scale')\"></div></div><div style=\"overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 0px;bottom: 0px;\"><div style=\"border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: 0px; top: -665px; width: 690px; height: 786px; -moz-user-select: none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://maps.google.com/intl/en_ALL/mapfiles/iw3.png',sizingMethod='scale')\"></div></div><div style=\"overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 305px; top: 0px;\"><div style=\"border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: -665px; top: 0px; width: 690px; height: 786px; -moz-user-select: none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://maps.google.com/intl/en_ALL/mapfiles/iw3.png',sizingMethod='scale')\"></div></div><div style=\"overflow: hidden; width: 25px; height: 25px; z-index: 1; position: absolute; left: 305px; bottom:0px;\"><div style=\"border: 0px none ; margin: 0px; padding: 0px; position: absolute; left: -665px; top: -665px; width: 690px; height: 786px; -moz-user-select: none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://maps.google.com/intl/en_ALL/mapfiles/iw3.png',sizingMethod='scale')\"></div></div><div style=\"border-top: 1px solid rgb(171, 171, 171); position: absolute; left: 25px; top: 0px; width: 280px; height: 25px; background-color: white;\"></div><div style=\"border-bottom: 1px solid rgb(171, 171, 171); position: absolute; left: 25px; bottom: 0px; width: 280px; height: 25px; background-color: white;\"></div><div style=\"border-left: 1px solid rgb(171, 171, 171); border-right: 1px solid rgb(171, 171, 171); position: absolute; left: 0px; top: 25px; width: 328px; height: 270px; background-color: white;\"/><div class=\"box-contents\">";}return str;}function bottomRoundDiv() {var str = "</div></div></div>";return str;}function valid_reportProblem(frm) {if (!validtext_empty("txtrpEmail", "Enter your email.")) {return false;}if (!validtext_empty("txtrpProblem", "Enter the problem description.")) {return false;}if (!validtext_email("txtrpEmail", "Enter a valid Email.")) {return false;}return true;}function send_reportproblem() {if (valid_reportProblem()) {url = UrlTracking + "?call=sendproblem";url += "&fname=" + document.getElementById("txtrpFName").value;url += "&lname=" + document.getElementById("txtrpLName").value;url += "&email=" + document.getElementById("txtrpEmail").value;url += "&problem=" + document.getElementById("txtrpProblem").value;url += "&urlmap=" + window.location.href;DoCrossRequestV2(url);document.getElementById("tblrptproblem").style.display = "none";document.getElementById("divthanks").style.display = "block";}}function triggerEventClick(objid) {var clickevent = document.createEvent("MouseEvents");clickevent.initEvent("click", true, true);document.getElementById(objid).dispatchEvent(clickevent);}function openBoxRP() {document.getElementById("tblrptproblem").style.display = "block";document.getElementById("divthanks").style.display = "none";document.getElementById("divHideAll").style.display = "block";document.getElementById("lBFormProblem").style.display = "block";if (clickedAttractionIndex != -1) {gmarkers[clickedAttractionIndex].closeInfoWindow();}}function closeBoxRP() {document.getElementById("divHideAll").style.display = "none";document.getElementById("lBFormProblem").style.display = "none";}function isFF() {if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) {return true;} else {return false;}}function getPosition(ctl) {var left_top = [2];var leftpos = 0;var toppos = 0;aTag = ctl;while (aTag.tagName != "BODY" && aTag.tagName != "HTML") {aTag = aTag.offsetParent;leftpos += aTag.offsetLeft;toppos += aTag.offsetTop;}left_top[0] = ctl.offsetLeft + leftpos;left_top[1] = ctl.offsetTop + toppos;return left_top;}function sleep(milliseconds) {var start = (new Date()).getTime();for (var i = 0; i < 10000000; i++) {if (((new Date()).getTime() - start) > milliseconds) {break;}}}function button_on(imgId) {if (document.images) {butOn = document.getElementById(imgId).src.replace(".gif", "_on.gif");document.getElementById(imgId).src = butOn;}}function button_off(imgId) {if (document.images) {butOff = document.getElementById(imgId).src.replace("_on.gif", ".gif");document.getElementById(imgId).src = butOff;}}
