// <!--- class navigation --->
function go(){
URL = "sp.cfm?loadpage=displayclass.cfm&classID="
if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none") {
URL += document.selecter.select1.options[document.selecter.select1.selectedIndex].value
location = URL  
		}
	}
//-->

	  function openWin(page) 
{
newwin = window.open(page,'', 'width=520,height=550,scrollbars=1,resizable=0,status=1,menubar=0,toolbar=0,location=0,directories=0,copyhistory=0');
}	
	


// <!--- open Windows --->
function openScript(url,width,height) {
        var Win = window.open(url,"openScript",'width=' + width + ',height=' + height +',resizable=0,scrollbars=no,menubar=no,status=no,toolbar=0');
}



// <!--- open Windows --->
function openScriptScroll(url,width,height) {
        var Win = window.open(url,"openScript",'width=' + width + ',height=' + height +',resizable=0,scrollbars=yes,menubar=no,status=no,toolbar=0');
}


function loadarticle(articleID) {
if (articleID == "") {
alert("You must enter an article ID");
return;
}
eval('top.location.href="sp.cfm?articleID=" + articleID + "&articlePages=1"')  
}


// <!--- article notification --->
function tellafriend(email, articleID) {
if (email == "") {
alert("Please enter an email address.")
return
}

re11 = /@/i;
rel2 = /'/i;
rel3 = /./i; 	
rel4 = / /i;
if (!(re11.test(email)) && !(rel2.test(email)) && (rel3.test(email)) && !(rel4.test(email)) ) 
{
alert("Please enter a valid email address.")
return
}

var URL = "tellfriend.cfm?emailaddress=";
URL += email;
URL +="&articleID=";
URL+=articleID

              anewWin = window.open('','', 
                  'width=300,height=80,scrollbars=0,'+
                  'resizable=0,status=0,menubar=0,toolbar=0,'+
                  'location=0,directories=0,copyhistory=0');
				  
				anewWin.location.href = URL
		  
}

// <!--- news notification --->

function tellafriendnews(email, NewsID) {
if (email == "") {
alert("Please enter an email address.")
return
}

re11 = /@/i;
rel2 = /'/i;
rel3 = /./i; 	
rel4 = / /i;
if (!(re11.test(email)) && !(rel2.test(email)) && (rel3.test(email)) && !(rel4.test(email)) ) 
{
alert("Please enter a valid email address.")
return
}

var URL = "tellfriendnews.cfm?emailaddress=";
URL += email;
URL +="&NewsID=";
URL+=NewsID

              anewWin = window.open('','', 
                  'width=300,height=80,scrollbars=0,'+
                  'resizable=0,status=0,menubar=0,toolbar=0,'+
                  'location=0,directories=0,copyhistory=0');
				  
				anewWin.location.href = URL
				
				}
				
		
				
function checkEmail(form)
{

if (form.FriendName.value == "")

	{alert("Please enter a name.");return;}

	else {
		var emailOK = validateEmail(form.FriendEmail.value)
		if (emailOK == 0)
		{alert("Please provide a valid email address. Your email must be:\n\n1) No spaces\n2) No commas\n3) No apostraphes\n4) An @ sign\n5) At least one period (.)\n\nAccounts with invalid email addresses will be cancelled."); return}
			else
				{document.addFriend.submit();}

		}
}



function validateEmail(email)
{
re11 = /@/i;
rel2 = /'/i;
rel3 = /./i; 	
rel4 = / /i;
if (!(re11.test(email)) || (rel2.test(email)) || (email.indexOf(".") == -1) || (rel4.test(email)) || (email.indexOf(",") != -1)) 
{return 0;}
else
{return 1;}

}





// <!--- email arts --->
function emailMyArt(mail, friendmail) {


if (mail == "" && friendmail == "") {
alert("Please enter an email address.")
return
}

var URL = "act_emailMyArt.cfm?mail=";
URL += mail;
URL += "&friendmail=";
URL += friendmail;

              newwin = window.open('','', 
                  'width=300,height=80,scrollbars=0,'+
                  'resizable=0,status=0,menubar=0,toolbar=0,'+
                  'location=0,directories=0,copyhistory=0');
				  
				newwin.location.href = URL
				  
}
