function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else {
    alert("Press CTRL-D (Netscape/Mozilla) or CTRL-T (Opera) to bookmark");
  }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function NewWindow(mypage, myname, w, h, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
    win = window.open(mypage, myname, winprops)
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function ClickClear(thisfield, defaulttext) {
    if (thisfield.value == defaulttext) {
        thisfield.value = "";
    }
}

function ClickRecall(thisfield, defaulttext) {
    if (thisfield.value == "") {
        thisfield.value = defaulttext;
    }
}

function update_link(linkID,newLink) {
    document.getElementById(linkID).href = newLink;
    return;
}

function toggle(id) {
    if(isVisible(id)) {
        hideElement(id);
        changeClass('q_'+id,'off');
    } else {
        showElement(id);
        changeClass('q_'+id,'on');
    }
}

function isVisible(id) {
    var visible = true;
    if(document.getElementById) {
        if(document.getElementById(id).style.display == 'none') {
            visible = false;
        }
    } else {
        if(document.layers) {
            if(document.id.display == 'none') {
                visible = false;
            }
		} else {
            if(document.all.id.style.display == 'none') {
                visible = false;
            }
		}
    }
    return visible;
}

function hideElement(id) {
    //safe function to hide an element with a specified id
	if(document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	} else {
		if(document.layers) { // Netscape 4
			document.id.display = 'none';
		} else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showElement(id) {
    //safe function to show an element with a specified id	  
	if(document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	} else {
		if(document.layers) { // Netscape 4
			document.id.display = 'block';
		} else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

function changeClass(id,className) {
    identity = document.getElementById(id);
    identity.className = className;
}












        
        
        // the starting index in the above array.  It should be set to the value of the div which doesn't have the CSS Display property set to "none"
        var i = 0;
        var currentPic = 0;

        
        // the number of milliseconds between swaps.  Default is five seconds.
        var wait = 4000;

        
    // the function that performs the fade
			function swapFade() {
				Effect.Fade('box-'+i, { duration:1, from:1.0, to:0.0 });
				i++;
				if (i == 3) i = 0;
                window.setTimeout('swapFade2()',890);
			}
			function swapFade2() {
				Effect.Appear('box-'+i, { duration:1, from:0.0, to:1.0 });
				currentPic = i;
			}
			

        // the function that performs the fade
        function swapFadeForward() {
            Effect.Fade('box-'+i, { duration:1, from:1.0, to:0.0 });
            i++;
            if (i == 3) i = 0;
            window.setTimeout('swapFadeForward2()',890);
            }
            function swapFadeForward2() {
                Effect.Appear('box-'+i, { duration:1, from:0.0, to:1.0 });
                currentPic = i;
                }
        
        function swapFadeBack() {
            Effect.Fade('box-'+i, { duration:1, from:1.0, to:0.0 });
            i--;
            if (i == -1) i = 2;
            window.setTimeout('swapFadeBack2()',890);
        }
        function swapFadeBack2() {
            Effect.Appear('box-'+i, { duration:1, from:0.0, to:1.0 });
            currentPic = i;
        }
        
        // turn slideshow on.
        function startPage() {
            slideshow = setInterval('swapFade()',wait);
        }
        
        // turn slideshow off.
        function stopPage() {
            clearInterval(slideshow);
        }
        
        
    // selected picture
        function selectPic(picselect) {
            Effect.Fade('box'+currentPic, { duration:1, from:1.0, to:0.0 });
            i++;
            if (i == 3) i = 0;
            Effect.Appear(divs_to_fade[picselect], { duration:1, from:0.0, to:1.0 });
            currentPic = picselect;
        }

        
        function galleryOn() {
            Effect.Appear(gallery, { duration:1, from:0.0, to:1.0 });
        }
        function galleryOff() {
            Effect.Fade(gallery, { duration:1, from:1.0, to:0.0 });
        }

// Script Source: www.insighteye.com
function checkCheckBox(f){
if (f.agree[0].checked == false )
{
alert("You MUST accept the Terms and Conditions to continue");
return false;
}else
return true;
}