//web pages - image thumbnails
var lastID = 0;
function SelectImg(id) {
if (lastID > 0) {
document.getElementById(lastID).className = "thumbNormal";
}
document.getElementById(id).className = "thumbSelected";
document.getElementById(0).src = document.getElementById(id).src;
lastID = id;
}
function LoadTrigger() {
SelectImg(1);
}
//web pages - image thumbnails end

//cursor functionality
function over(id, cursorVal)
{
	document.getElementById(id).style.cursor = cursorVal;
}
function out(id)
{
	document.getElementById(id).style.cursor = 'default';
}
//cursor functionality end


//menu functionality
//editable section:-
var menu1=new Array()
menu1[0]='<a href="AddToDirectory.htm">Join Directory (Free Listing)</a>'
menu1[1]='<a href="FindSpecific.htm">Find Your Listing</a>'
menu1[2]='<a href="Members-Change.htm">Change Your Listing</a>'
menu1[3]='<a href="Members.htm">Being A Directory Member</a>'
menu1[4]='<a href="Advertising.htm">Advertising</a>'
menu1[5]='<a href="Members-FREEWebPage.htm">FREE Web Page</a>'
var menu2=new Array()
menu2[0]='<a href="FindSpecific.htm">Find Specific Watersport</a>'
menu2[1]='<a href="Noticeboard.htm">Noticeboard</a>'
menu2[2]='<a href="SiteMap.htm">Site Map</a>'
menu2[3]='<a href="Search.htm">Search Watersporty</a>'
var menu3=new Array()
menu3[0]='<a href="About.htm">About Watersporty</a>'
menu3[1]='<a href="ContactUs.htm" rel="nofollow">Contact Watersporty</a>'
menu3[2]='<a href="LinkToUs.htm">Link To Us</a>'
menu3[3]='<a href="Advertising.htm">Advertising</a>'

var menuwidth='165px'
var menubgcolor='#101010'
var hidedelay=250
var hidemenu_onclick="yes"
//non editable section:-
var IE4=document.all
var NS6=document.getElementById&&!document.all
if (IE4||NS6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="menuClearHide()" onMouseout="dynamHide(event)"></div>')
function getOffsetPos(what, offsettype){
var offsetTotal=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentElement=what.offsetParent;
while (parentElement!=null){
offsetTotal=(offsettype=="left")? offsetTotal+parentElement.offsetLeft : offsetTotal+parentElement.offsetTop;
parentElement=parentElement.offsetParent;
}
return offsetTotal;
}
function showhide(obj, e, visible, hidden, menuwidth){
if (IE4||NS6)
menuObject.style.left=menuObject.style.top="-500px"
if (menuwidth!=""){
menuObject.widthobj=menuObject.style
menuObject.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}
function ieCompatibility(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function clearEdge(obj, whichedge){
var offsetEdge=0
if (whichedge=="rightedge"){
var windowedge=IE4 && !window.opera? ieCompatibility().scrollLeft+ieCompatibility().clientWidth-15 : window.pageXOffset+window.innerWidth-15
menuObject.contentmeasure=menuObject.offsetWidth
if (windowedge-menuObject.x < menuObject.contentmeasure)
offsetEdge=menuObject.contentmeasure-obj.offsetWidth
}
else{
var topedge=IE4 && !window.opera? ieCompatibility().scrollTop : window.pageYOffset
var windowedge=IE4 && !window.opera? ieCompatibility().scrollTop+ieCompatibility().clientHeight-15 : window.pageYOffset+window.innerHeight-18
menuObject.contentmeasure=menuObject.offsetHeight
if (windowedge-menuObject.y < menuObject.contentmeasure){ 
offsetEdge=menuObject.contentmeasure+obj.offsetHeight
if ((menuObject.y-topedge)<menuObject.contentmeasure) 
offsetEdge=menuObject.y+obj.offsetHeight-topedge
}
}
return offsetEdge
}
function menuPopulate(what){
if (IE4||NS6)
menuObject.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
menuClearHide()
menuObject=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
menuPopulate(menucontents)
if (IE4||NS6){
showhide(menuObject.style, e, "visible", "hidden", menuwidth)
menuObject.x=getOffsetPos(obj, "left")
menuObject.y=getOffsetPos(obj, "top")
menuObject.style.left=menuObject.x-clearEdge(obj, "rightedge")+"px"
menuObject.style.top=menuObject.y-clearEdge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return returnValueClick()
}
function returnValueClick(){
if (IE4||NS6) return false
else return true
}
function contain_NS6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
function dynamHide(e){
if (IE4&&!menuObject.contains(e.toElement))
delayhidemenu()
else if (NS6&&e.currentTarget!= e.relatedTarget&& !contain_NS6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}
function hidemenu(e){
if (typeof menuObject!="undefined"){
if (IE4||NS6)
menuObject.style.visibility="hidden"
}
}
function delayhidemenu(){
if (IE4||NS6)
delayhide=setTimeout("hidemenu()",hidedelay)
}
function menuClearHide(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}
if (hidemenu_onclick=="yes")
document.onclick=hidemenu
//menu functionality end

// html menu
function htmlMenu_limit(a,b){ //v1.1.2 by PVII-www.projectseven.com
 document.htmlMenulimit=a;document.htmlMenumin=b;
 if(document.getElementById&&navigator.appVersion.indexOf("MSIE")>-1&&!window.opera){
 if(window.attachEvent){window.attachEvent("onresize",htmlMenu_setMinWidth);
 window.attachEvent("onload",htmlMenu_setMinWidth);}else{onload=htmlMenu_setMinWidth;
 onresize=htmlMenu_setMinWidth;}}}htmlMenu_limit('outer',960);
function htmlMenu_setMinWidth(){ //v1.1.2 by PVII-www.projectseven.com
 var cw,w,pl,pr,ml,mr,br,bl,ad,theDiv=document.htmlMenulimit;
 var g=document.getElementById(theDiv);w=parseInt(document.htmlMenumin);
 if(g&&document.body&&document.body.clientWidth){gs=g.currentStyle;
 cw=parseInt(document.body.clientWidth);pl=parseInt(gs.paddingLeft);
 pr=parseInt(gs.paddingRight);ml=parseInt(gs.marginLeft);mr=parseInt(gs.marginRight);
 bl=parseInt(gs.borderLeftWidth);br=parseInt(gs.borderRightWidth);ml=ml?ml:0;
 mr=mr?mr:0;pl=pl?pl:0;pr=pr?pr:0;bl=bl?bl:0;br=br?br:0;ad=pl+pr+ml+mr+bl+br;
 if(cw<=w){w-=ad;g.style.width=w+"px";}else{g.style.width="auto";}}
}
function htmlMenu_Swap(){ //v1.4 by PVII
 var i,x,tB,j=0,tA=new Array(),arg=htmlMenu_Swap.arguments;
 if(document.getElementsByTagName){for(i=4;i<arg.length;i++){tB=document.getElementsByTagName(arg[i]);
  for(x=0;x<tB.length;x++){tA[j]=tB[x];j++;}}for(i=0;i<tA.length;i++){
  if(tA[i].className){if(tA[i].id==arg[1]){if(arg[0]==1){
  tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}else{tA[i].className=arg[2];}
  }else if(arg[0]==1 && arg[1]=='none'){if(tA[i].className==arg[2] || tA[i].className==arg[3]){
  tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}
  }else if(tA[i].className==arg[2]){tA[i].className=arg[3];}}}}
}
function htmlMenu_writeStyles(op,a){ //v1.5 by PVII
if(op==0||document.getElementById){var tS="<sty"+"le type=\"text/css\">";
tS+=a+"<"+"/sty"+"le>";document.write(tS);document.close();}
}
htmlMenu_writeStyles(1,'.closed ul{ display:none;}.open ul{ display:block;}');
//html menu end

function spamChecker(valueEntered){
var bSuccess=false
if (valueEntered=="5"){
bSuccess=true
}
return bSuccess;
}

