function format(num) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); cents = num%100; num = Math.floor(num/100).toString(); if(cents<10) cents = "0" + cents; for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + num); } function letternumber(e, t) { var key; var keychar; if (window.event) key = window.event.keyCode; else if (e) key = e.which; else return true; keychar = String.fromCharCode(key); keychar = keychar.toLowerCase(); if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) || (key==39) || (key==35) ||(key==46)) return true; else if ((("abcdefghijklmnopqrstuvwxyz0123456789 ").indexOf(keychar) > -1) && (t=='A')) return true; else if (((".0123456789 ").indexOf(keychar) > -1) && (t=='N')) return true; else return false; }function bcolor(color, e) {e.style.backgroundColor=color;}function bcolor1(color, e) {e.style.backgroundColor=color;e.style.cursor="pointer";if((color != "") && (color != "#FFE38E")) e.style.color="#FFFFFF";else e.style.color = "#405667";}function NW(pn) {x_width = 806;x_height = 625;document.frmobj.target='frmobjwin';if (pn != '') {document.frmobj.obj_array.value = pn;document.frmobj.i.value = 1;} else {document.frmobj.obj_array.value = document.frmobj.obj_array_tmp.value;document.frmobj.i.value = document.frmobj.i_tmp.value;}window.open('','frmobjwin','height='+x_height+',width='+x_width+',left=0,top=0,status=yes,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no');}function SAVE(pn) {document.frmobj.obj_array.value = pn;document.frmobj.i.value = 1;}function x_onchange(obj) {names = new String (obj.value);pattern = /\s*sep\s*/;nameList = names.split(pattern);return '?rid='+nameList[1]+'&pid='+nameList[0];}function MV(cur,which) {if(navigator.userAgent.indexOf('Firefox') != -1) {cur.style.MozOpacity=0.8;}strength=(which==0)? 0.8 : 1;if (cur.style.MozOpacity) cur.style.MozOpacity=strength;else if (cur.filters) cur.filters.alpha.opacity=strength*100;}d=document;ns4=(d.layers)?true:false;ns6=(navigator.userAgent.indexOf("Gecko")!=-1)?true:false;mac=(navigator.appVersion.indexOf("Mac")!=-1)?true:false;if(ns6)mac=false;opera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;ns61=(parseInt(navigator.productSub)>=20010726)?true:false;ie4=(!d.getElementById && d.all)?true:false;ie5p=(d.getElementById && d.all && !opera)?true:false;function fadein() {var ranNum= Math.round(Math.random()*30);if(ie5p) imgOne.filters[0].Apply();document.images['imgOne'].src="i/header/"+ranNum+".jpg";if(ie5p) imgOne.filters[0].Play();}function bookmark_us(url, desc) {netscape="Please, hit CTRL+D to add a bookmark to this site.";if (navigator.appName=='Microsoft Internet Explorer') window.external.AddFavorite(url, desc);else if (navigator.appName=='Netscape') alert(netscape);}function checkemail(obj){var filter=/^.+@.+\..{2,3}$/;if (filter.test(obj)) return true;else return false;}function frm_submit(e) {if ((e.your_names.value==" your names") || (e.your_names.value=="") ||(e.your_names.value== " insert your names")) { e.your_names.style.backgroundColor="#FFFF00"; e.your_names.style.color="#FF0000"; e.your_names.value=" insert your names";return false;}if ((e.your_email.value==" your email") || (e.your_email.value=="") ||(e.your_email.value== " insert your email") || (!checkemail(e.your_email.value))) { e.your_email.style.backgroundColor="#FFFF00"; e.your_email.style.color="#FF0000"; e.your_email.value=" insert your email";return false;}if (e==eval('document.frmcontactus')) {if ((e.subject.value==" subject") || (e.subject.value=="") ||(e.subject.value== " insert subject")) { e.subject.style.backgroundColor="#FFFF00"; e.subject.style.color="#FF0000"; e.subject.value=" insert subject";return false;}if ((e.message.value==" message") || (e.message.text=="") ||(e.message.value== " insert message")) { e.message.style.backgroundColor="#FFFF00"; e.message.style.color="#FF0000"; e.message.value=" insert message";return false;}}e.submit();if (e==eval('document.frmcontactus')) {alert("Thank you for your enquiry. Your message has been successfully sent \nand we will be in touch shortly.")}if (e==eval('document.frmsubscribe')) {if (e.subscrtype[0].checked) {alert("Thank you for taking the time to subscribe to our newsletter. \nYou should be hearing from us shortly.");}if (e.subscrtype[1].checked) {alert("We are sorry to see you go. Your details will be removed from our \nnewsletter / mailing list(s) within the next three working days.");}}e.your_names.value=" your names";e.your_email.value=" your email";e.subject.value=" subject";e.message.value=" message";}function x_onblur(obj, txt) {if(obj.value=='') obj.value = txt;}function x_onfocus(obj, txt) {if((obj.value==txt) || (obj.value== ' insert'+txt)) {obj.style.backgroundColor="#FFFFFF";obj.style.color="#000000";obj.value='';}}function windowtSize() {var myWidth = 0, myHeight = 0;if( typeof( window.innerWidth ) == 'number' ) {myWidth = window.innerWidth;myHeight = window.innerHeight;} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {myWidth = document.documentElement.clientWidth;myHeight = document.documentElement.clientHeight;} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {myWidth = document.body.clientWidth;myHeight = document.body.clientHeight;}if((slideshow_width!='') && (slideshow_height!='')) {e=document.getElementById("imgobj");e.style.width = myWidth;e.style.height = myHeight-25;}slideshow_width=myWidth-6;slideshow_height=myHeight-25;}function rotateimage(){windowtSize();if (ie4||dom){resetit(curcanvas);var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas);crossobj.style.zIndex++;tempobj.style.visibility="visible";var temp='setInterval("fadepic()",50)';dropslide=eval(temp);curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0";} else document.images.defaultslide.src=fadeimages[curimageindex];curimageindex=(curimageindex';nextimageindex=(nextimageindex';if(fadeimages.length != 1) rotateimage();}var IMAGE_MOVE="";function max_min(){window.moveTo(0,0);if(max_min_check) {if(IMAGE_MOVE == "canvas0") {dd.elements.canvas0.moveTo(0, 0);dd.elements.canvas0.setDraggable(false);}max_min_check = false;window.resizeTo(width_org+10,height_org+49);document.frmfullsceen.fullscreen.src = 'i/maximize.gif';document.frmfullsceen.fullscreen.alt = 'Full Screen';} else {max_min_check = true;window.resizeTo(screen.width,screen.height);document.frmfullsceen.fullscreen.src = 'i/minimize.gif';document.frmfullsceen.fullscreen.alt = 'Original Screen';}windowtSize();try {if(fadeimages.length == 1) navigate(0);if ((IMAGE_MOVE=="") && (max_min_check) &&(slideshow_width+16<=document.images.img_x.width)) {IMAGE_MOVE = "canvas0";SET_DHTML(CURSOR_MOVE, "canvas0");}if ((IMAGE_MOVE == "canvas0") && (max_min_check) &&(slideshow_width+16<=document.images.img_x.width)) {dd.elements.canvas0.moveTo(0, 0);dd.elements.canvas0.setDraggable(true);}} catch(err) {;}}function navigate(step) {if(i > 1) return false;document.frmfullsceen.previous.src = 'i/previous.gif';document.frmfullsceen.next.src = 'i/next.gif';if((i_tmp+step >=0) && (i_tmp+step';else if((step==0) && (max_min_check)) crossobj.innerHTML='';else crossobj.innerHTML='';}function DIVpp(show, rec) {document.frmplan.seltype_id.value = show;for (i = 1; i <= rec; i++)try {eval('document.getElementById(\''.concat("DIVpp1", i, '\').className="off"'));eval('document.getElementById(\''.concat("DIVpp2", i, '\').className="off"'));eval('document.getElementById(\''.concat("DIVpp3", i, '\').className="off"'));eval('document.getElementById(\''.concat("DIVpp4", i, '\').className="off"'));eval('document.getElementById(\''.concat("DIVpp5", i, '\').className="off"'));eval('document.getElementById(\''.concat("DIVpp6", i, '\').className="off"'));} catch(err) {;}for (i = 1; i <= rec; i++)try {eval('document.getElementById(\''.concat(show, i, '\').className="on"'));if (show == "DIVpp1") eval('document.getElementById(\''.concat("DIVpp4", i, '\').className="on"'));if (show == "DIVpp2") eval('document.getElementById(\''.concat("DIVpp5", i, '\').className="on"'));if (show == "DIVpp3") eval('document.getElementById(\''.concat("DIVpp6", i, '\').className="on"'));} catch(err) {;}}var font_size = 11;function font_max(block){obj = document.getElementById(block);if(font_size < 17)font_size = font_size + 1;obj.style.fontSize = font_size;} function Qlink(list) {var newPage = list.options[list.selectedIndex].value;if ((newPage != 0) & (newPage.substr(0, 1) == '#')) location.href=newPage;else if ((newPage != 0) & (newPage.substr(0, 1) != '#')) window.open(newPage);}