function checkEmail()
{
	var emailID = document.frmJoinNewsletter.txtEmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email Address")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		alert("Invalid E-mail Address")
		emailID.focus()
		return false
	}
	
	sBody = document.frmJoinNewsletter.body.value + document.frmJoinNewsletter.txtEmail.value
	document.frmJoinNewsletter.body.value = ""
	document.frmJoinNewsletter.body.value = sBody
	
	return true
}

function echeck(str) {

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	
	if (str.indexOf(at)==-1){
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	    return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
	    return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
	    return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
	    return false
	 }
		
	 if (str.indexOf(" ")!=-1){
	    return false
	 }

	 return true					
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function SetBut(thist, set, id,msg){
	var str = 'document.all.' + id ;
	var conv = eval(str);	
	
	if(set == 0){
		thist.style.background = "Tan";
		conv.className = "white";
		thist.style.cursor = "hand";
		status = msg;
		return true;
		
	}else{
		thist.style.background = "#a78100";
		conv.className = "white";
		status = "";
		return true;
	}
}

function GoThere(url){
	if (url.substring(0,10) == "http://www"){
		window.open(url)
	}
	else {
		document.location = url
	}
}

function LrgImg()
{
	objSrc = window.event.srcElement;
	re = '/thumbs';
	objNewSrc = objSrc.src.replace(re, '');
	document.all.item('ImgLrg').src = objNewSrc;
	document.all('divSmlImg').style.display = 'none';
	document.all('divLrgImg').style.display = '';
}

function GoBack()
{
	document.all.item('ImgLrg').src = 'images/blank.jpg';
	document.all('divSmlImg').style.display = '';
	document.all('divLrgImg').style.display = 'none';
}