// JavaScript Document

function gotoWebsite(urlnum){


	if(urlnum=="1") {
	
		urlSend = window.location = "events.shtml";
	
	} 
				

	if(urlnum=="2") {
	
		urlSend = window.location = "resources.shtml";
	
	} 

	if(urlnum=="3") {
	
		urlSend = window.location = "membership.shtml";
	
	} 

	if(urlnum=="4") {
	
		urlSend = window.location = "about.shtml";
	
	} 	
	
	if(urlnum=="5") {
	
		urlSend = window.location = "contact.shtml";
	
	} 		
	
	} 

// A couple of window launching functions

function MM_openBrWindow(theURL,winName,features) { //v.2.0
var newWindow = window.open(theURL,winName,features);
newWindow.focus()
} 

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? parseInt((screen.width-w)/2) : 0;
TopPosition = (screen.height) ? parseInt((screen.height-h)/2) : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',screenX='+TopPosition+',screenY='+LeftPosition+',scrollbars='+scroll;
win = window.open(mypage,myname,settings);
if(win.window.focus){win.window.focus();}
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "','toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width=460,height=520,top=120,left=120');");
}

function formHandler(form){

var URL = document.form.site.options[document.form.site.selectedIndex].value;

window.location.href = URL;

}

function formHandler2(form2){

var URL = document.form2.site.options[document.form2.site.selectedIndex].value;

window.location.href = URL;

}

function validateForm() {
	
	if((document.send.from_name.value == "") || (document.send.from_name.value == null)) {
		alert('Please enter your Name.');
		document.send.from_name.focus();
		return false;
	} 
	if((document.send.cmvalue1.value == "") || (document.send.cmvalue1.value == null)) {
		alert('Please enter your Title.');
		document.send.cmvalue1.focus();
		return false;
	}
	if((document.send.cmvalue2.value == "") || (document.send.cmvalue2.value == null)) {
		alert('Please enter your Company.');
		document.send.cmvalue2.focus();
		return false;
	} 
	if((document.send.cmvalue3.value == "") || (document.send.cmvalue3.value == null)) {
		alert('Please enter your Address.');
		document.send.cmvalue3.focus();
		return false;
	} 
	if((document.send.cmvalue5.value == "") || (document.send.cmvalue5.value == null)) {
		alert('Please enter your City.');
		document.send.cmvalue5.focus();
		return false;
	} 
	if((document.send.cmvalue6[0].selected) || (document.send.cmvalue6.value == "") || (document.send.cmvalue6.value == null)) {
        alert("Please select your State/Province.");
     	document.send.cmvalue6.focus();
        return false;
	}
	if((document.send.cmvalue7.value == "") || (document.send.cmvalue7.value == null)) {
		alert('Please enter your Zip.');
		document.send.cmvalue7.focus();
		return false;
	} 
	if((document.send.cmvalue9.value == "") || (document.send.cmvalue9.value == null)) {
		alert('Please enter your Phone.');
		document.send.cmvalue9.focus();
		return false;
	} 
	if (document.send.from_email_address.value == "" || document.send.from_email_address.value.indexOf("@") == -1 || document.send.from_email_address.value.indexOf(".") == -1) {
        alert("Please enter a proper email address (e.g. somebody@isp.com).");
     	document.send.from_email_address.focus();
        return false;
	}
}

//start of rotation script
var pause = 5000;                                                    
Know2var = "sponsor2"    
Know1var = "sponsor1"

         function Rotate(CurrentVar){  
			if (CurrentVar == "3"){CurrentVar = 1;} 		                                                      
				
				switch (CurrentVar){
						case 1 :
    					changeObjectVisibility(Know2var, "hidden");	
    					changeObjectVisibility(Know1var, "visible");
					break;
						case 2 :
    					changeObjectVisibility(Know1var, "hidden");	
    					changeObjectVisibility(Know2var, "visible");
					break;
				}						  
			NewCurrentVar = CurrentVar + 1;
                       	window.setTimeout('Rotate(NewCurrentVar)',pause); 
                       }
//end of rotation script