//function for linking from the cover menu
function goToCover ()
{
	val = document.cover_form.cover_menu.value;
	if(val != 0){
		reloc = "http://www.verveonline.com/"+val+"/index"+val+".shtml";
		window.location = reloc;
	}	
}

//function to validate newsletter email address
function emailValid()
{
	if (document.newsForm.email.value == ""){
		alert ("Please enter your email address");
		document.newsForm.email.focus();
  	}
	else if ((document.newsForm.email.value.indexOf('@') == -1) || (document.newsForm.email.value.indexOf('.') == -1)){
		alert ("The email address you have entered is invalid");
		document.newsForm.email.select();
		document.newsForm.email.focus();
  	}
  	else
  	{
  		window.name = "previous";
  		//windowNews = window.open("/cgi-bin/newsletter.pl?email="+document.newsForm.email.value, "newsletter","toolbar=0,resizable=0,scrollars=0,status=0,width=450,height=330");
		windowNews = window.open("/others/postnewsletter.asp?email="+document.newsForm.email.value, "newsletter","toolbar=0,resizable=0,scrollars=0,status=0,width=450,height=330");
		windowNews.focus();
  		//document.newsForm.submit();
  	}	
}

//email article function
function emailArt(strURL)
{
	//windowEmail = window.open("/cgi-bin/email-art.pl?form=yes&link="+window.location, "new_window","toolbar=0,resizable=0,scrollars=0,status=0,width=450,height=330");
	//windowEmail.focus();

	windowEmail = window.open("/others/emaillink.asp?strURL="+strURL, "new_window","toolbar=0,resizable=0,scrollars=0,status=0,width=450,height=330");
	windowEmail.focus();
}

//switch stylesheets function
function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

//XL Slideshow function
function xlSS(folder, num, on, prefix, play){
	windowPop = window.open("/cgi-bin/xlSS.pl?folder="+folder+"&num="+num+"&on="+on+"&prefix="+prefix+"&play="+play,"articlepopup","toolbar=0,resizable=0,scrollars=0,status=0,width=661,height=594,top=0,left=0");
	windowPop.focus();
}


//Big Slideshow function
function bigSS(folder, num, on, prefix, play){
	windowPop = window.open("/cgi-bin/bigSS.pl?folder="+folder+"&num="+num+"&on="+on+"&prefix="+prefix+"&play="+play,"articlepopup","toolbar=0,resizable=0,scrollars=0,status=0,width=684,height=461,top=0,left=0");
	windowPop.focus();
}

//Small Slideshow function
function smallSS(folder, num, on, prefix, play){
	windowPop = window.open("/cgi-bin/smallSS.pl?folder="+folder+"&num="+num+"&on="+on+"&prefix="+prefix+"&play="+play,"articlepopup","toolbar=0,resizable=0,scrollars=0,status=0,width=527,height=461,top=0,left=0");
	windowPop.focus();
}
