//Pop-it menu- By Dynamic Drive //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com //This credit MUST stay intact for use ////No need to edit beyond here var opera = navigator.userAgent.indexOf('Opera') >= 0 ? true : false; var ie4 = document.all && !opera; var ns6 = document.getElementById && !document.all; var ns4 = document.layers && !document.getElementById; var on = '#20A641', off = '#69a22f', grey = '#a0a0a0'; // colours var theWindow, theFrames, theDocument, theParent, menuWindow, topWindow; if (ie4 || ns6 || opera) { if (theDocument != null && theDocument.value != null) { theDocument.onclick=hidemenu; } } // utility fn to get value of a '); newWin.document.writeln(''); newWin.document.writeln('

This image is copyright - please do not copy or use without permission'); newWin.document.writeln('
Apply to the webmaster\@cressbrook.co.uk for details

'); newWin.document.writeln(''); newWin.document.writeln(''); } function popup(myUrl) { var topBars= 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,dependent=yes'; var myOptions = 'scrollbars=yes,width=640,height=500,resizeable=no,top=100,left=100'; var myFeatures = topBars+','+myOptions; var newWin = open(myUrl,'',myFeatures); // newWin.focus(); } function offerpopup(myUrl) { var topBars= 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,dependent=yes'; var myOptions = 'scrollbars=yes,width=520,height=500,resizeable=no,top=100,left=100'; var myFeatures = topBars+','+myOptions; var newWin = open(myUrl,'',myFeatures); //newWin.focus(); } function eventpop(myUrl) { var topBars= 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,dependent=yes'; var myOptions = 'scrollbars=yes,width=530,height=480,resizeable=no,top=100,left=100'; var myFeatures = topBars+','+myOptions; var getString = '' , i, aField, val, url = myUrl; if (document.forms['events']) { for (i =0; i < document.forms['events'].elements.length; i++) { aField = document.forms['events'].elements[i]; if (aField.type == 'checkbox' && aField.checked == true) getString += aField.name+'='+'on'+'&'; else if (aField.type == 'text') getString += aField.name+'='+aField.value+'&'; else if (aField.type == 'select-one') getString += aField.name+'='+aField.options[aField.selectedIndex].value+'&'; } if (getString != '') { var strurl = new String(url); if (strurl.indexOf('?') > 0) url += '&'+getString; else url += '?'+getString; } //alert(getString); } var newWin = open(url,'',myFeatures); } function mappop(myUrl) { var topBars= 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,dependent=yes'; var myOptions = 'scrollbars=no,width=640,height=490,resizeable=yes,top=25,left=25'; var myFeatures = topBars+','+myOptions; var mapWin = open(myUrl,'map',myFeatures); //mapWin.document.sizeFlag = 0; reSize(mapWin); mapWin.document.sizeFlag = 1; // mapWin.focus(); } function mapLink(myUrl) { var topWin = topWindow; window.document.sizeFlag = 0; topWindow.location = myUrl; window.moveTo(10,10); window.resizeTo(150,150); //window.close(); } function reSize(winnamex) { var winname = winnamex; if (winname == null) winname = window; if (winname.document.sizeFlag==null) winname.document.sizeFlag=0; if (winname.document.sizeFlag!=1) { winname.moveTo(25,25); winname.resizeTo(650,540); winname.document.sizeFlag = 1; } else { winname.moveTo(10,10); winname.resizeTo(150,150); winname.document.sizeFlag = 0; } } function enlarge(styleName) { if (!ie4 && !ns6) return; if (!document.click) document.click = 0; if (ie4) { if (document.click == 0) alert('In Internet Explorer you have to pull down the VIEW menu and select \'Text Size\' to do this.\nOther browsers such as Firefox will change the font size when you click this button.\nWe recommend using Firefox: see - www.getfirefox.com'); document.click = 1-document.click; return; } var accommIndex; if (!document.fsize) document.fsize = 12; else document.fsize = document.fsize+2; accommIndex = findStyleRule(styleName); if (accommIndex == -1) return; var newrule = styleName+' {font-size: '+document.fsize+';}'; try { document.styleSheets[1].deleteRule[accommIndex]; document.styleSheets[1].insertRule(newrule, accommIndex+1); window.resizeBy(0,0); } catch (CSSException) { alert('Exception'); } } function findStyleRule(styleName) { var k = -1; var i = 1; while (document.styleSheets[i] != null) { var j = 0; while (document.styleSheets[i].cssRules[j] != null) { //alert(document.styleSheets[i].cssRules[j].selectorText); if (document.styleSheets[i].cssRules[j].selectorText == styleName) { k = j; } j++; } i++; } return k; } function adPopup(myUrl, altUrl, width, height, plugin, enddate) { // loads an ad popup window. If a plugin is specified then will check to see if this is // available, and if not, loads the altUrl file. Loads only until the enddate // enddate should be in form 'Mar 21 2004' var i, today = new Date(); var end = new Date(Date.parse(enddate)); //alert(end.getDate()+' '+end.getMonth()+' '+end.getYear()); // check to see if this ad has expired ...... if (today.getYear() > end.getYear()) return; if (today.getYear() == end.getYear() && today.getMonth() > end.getMonth()) return; if (today.getYear() == end.getYear() && today.getMonth() == end.getMonth() && today.getDate() > end.getDate()) return; var validplugin = false; // assume there is a valid plugin if it's Win32 and IE4 or later // not ideal, but the best we can do ..... if ((ie4 && navigator.platform == 'Win32') || plugin == '' || altUrl == '') { validplugin = true; } // otherwise, see if there is a valid plugin .... else { for(i=0;i0) */ validplugin = true; } } } // set up the popup window ..... var topBars= 'directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,dependent=yes'; var myOptions = 'scrollbars=no,width='+width+',height='+height+',resizeable=no,top=100,left=100'; var myFeatures = topBars+','+myOptions; var newWin; // and display it ..... if (validplugin) newWin = open(myUrl,'',myFeatures); else newWin = open(altUrl, '', myFeatures); } function swapImg() { // var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.swapImgData; for (i=0; i < (swapImg.arguments.length-2); i+=3) { objStr = swapImg.arguments[(navigator.appName == 'Netscape')?i:i+1]; if ((objStr.indexOf('document.layers[')==0 && document.layers==null) || (objStr.indexOf('document.all[') ==0 && document.all == null)) { objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length); } obj = eval(objStr); if (obj != null) { swapArray[j++] = obj; swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj) ? obj.src:oldArray[j]; obj.src = swapImg.arguments[i+2]; } } document.swapImgData = swapArray; //used for restore } function restoreImg() { //v1.2 if (document.swapImgData != null) { for (var i=0; i<(document.swapImgData.length-1); i+=2) { document.swapImgData[i].src = document.swapImgData[i+1]; } } } function setEdge() { var objStr = setEdge.arguments[0]; var sw = setEdge.arguments[1]; var obj = document.getElementById(objStr); if (sw == 0) { obj.style.border = '2px solid #0000FF'; } else { obj.style.border = '2px solid #008000'; } } function showDiv(objid, checkbox) { var obj = document.getElementById(objid); var click = document.getElementById(checkbox); if (!click) return; if (click.checked == false) { obj.style.visibility = "hidden" } else { obj.style.visibility = "visible"; } showGo(); } function showGo() { var gobuts = new Array('go1a','go2a','go3a'); var divs = new Array('sizeopts','facilityopts','dateopts'); var obj, div, i; var click = document.getElementById('locate'); if (!click) return; for(i = 0; i