function findBrowser() { var browser; if (navigator.appName == 'Netscape' && document.layers != null) { browser = "ns"; } else if (document.all != null) { browser = "ie" } else if (navigator.appName == 'Netscape' && document.layers == null && navigator.appVersion.substring(0,1) > 4) { browser = "ns6"; } return browser; } function getRef(id) { if (findBrowser() == "ns") { return document.layers[id]; } else if (findBrowser() == "ie") { return document.all[id]; } else if (findBrowser() == "ns6") { return document.getElementById(id); } } function changeColor(id,color) { if (findBrowser() == "ns") { getRef(id).bgcolor = color; } else if (findBrowser() == "ie" || findBrowser() == "ns6") { getRef(id).style.backgroundColor = color; } } function changeClass(id,newClass) { getRef(id).className = newClass; } function changeImage(id,imageUrl) { document.images[id].src = imageUrl; } function hideLayer(id) { if (findBrowser() == "ns") { if (getRef(id).visibility == "show") { getRef(id).visibility = "hide"; } } else if (findBrowser() == "ie" || findBrowser() == "ns6") { if (getRef(id).style.visibility == "visible") { getRef(id).style.visibility = "hidden"; } } } function showLayer(id) { if (id) { if (findBrowser() == "ns") { if (getRef(id).visibility == "hide") { getRef(id).visibility = "show"; } } else if (findBrowser() == "ie" || findBrowser() == "ns6") { if (getRef(id).style.visibility == "hidden") { getRef(id).style.visibility = "visible"; } } } } function changeLocation(newURL) { document.location.href = newURL; } function changeLocationQstr(mn1,mn2,mn3,sid) { document.location.href = "index.asp?topmenuid="+mn1+"&mainmenuid="+mn2+"&submenuid="+mn3+"&sideid="+sid; } function changeLocationQstrWithAnchor(mn1,mn2,mn3,sid,anker) { document.location.href = "index.asp?topmenuid="+mn1+"&mainmenuid="+mn2+"&submenuid="+mn3+"&sideid="+sid+"#"+anker; } function openWindow(URL) { window.open(URL); } function openPreview(picURL, picWidth, picHeight, picBesk) { newWindow=window.open('','newWin'+picWidth+'','toolbar=no, width='+picWidth+',height='+picHeight) newWindow.document.write('Faldsled Strand Camping<\/title><\/head><body leftMargin=0 topMargin=0 marginwidth="0" marginheight="0"><img src="'+picURL+'" alt="'+picBesk+'"><\/body><\/html>') newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth, picHeight-newWindow.document.body.clientHeight) newWindow.focus() } function changeAlpha(id,alphaValue) { getRef(id).filters.alpha.opacity = alphaValue; } function rotateImage(intIndex) { if(!arr_Images.length) return var int_Index; if (intIndex == -1) { intCurrent++; int_Index = intCurrent; if (int_Index >= arr_Images.length) { int_Index = 0; intCurrent = 0; } } else { int_Index = intIndex; } if (findBrowser() == "ie") { document.getElementById(strIDName).filters[0].apply(); } document.images[strIDName].src = arr_Images[int_Index].src; if (findBrowser() == "ie") { document.getElementById(strIDName).filters[0].play(); } } function ViewSpecific(intIndex) { clearInterval(itvChange); setTimeout('rotateImage(' + intIndex + ');', 50); intCurrent = intIndex; } function StartStandardInterval() { itvChange = setInterval('rotateImage(-1)', 5000); } function Preload(arr_Image) { if(!arr_Image.length) return for(i=0; i< arr_Image.length; i++) { var obj_Image = new Image(); obj_Image.src = arr_Image[i]; arr_Image[i] = obj_Image; } }