// Copyright (c) BVM Microsystems
// Developed by : veda
// dated : 28 Apr 2004

// Update to new Format
// by : veda & Aadesh
// dated : 2 June 2004

var    ns=document.getElementById != null;
var    ie=document.all != null;


function confirmEmail()
{
	var email = document.forms[0].TEMAIL.value
	return confirm( "Your Email-ID is   " +  email + "\n\nProceed?" );
}

function isValidemail() 
{
	var email = document.forms[0].TEMAIL.value
	if(email == "")
	{
		alert("Please enter Email address.");		
		document.forms[0].TEMAIL.focus();
		return false;
	}
	if ( (email != "") && ((email.indexOf("@")==-1) ||(email.indexOf(".")==-1) ||(email.indexOf(" ")!=-1) ))
	{
		alert ("Please enter a valid  Email address.");
		document.forms[0].TEMAIL.select();
		document.forms[0].TEMAIL.focus();
		return false;
	}
	return true;
}

function valiadte()
{
	if(isValidemail())		   
	{
		if ( confirmEmail() )
			return true;
	}
	return false;
}

function processEmail()
{	
	if(isValidemail() && confirmEmail() )
	{                                                                   
	    var email = document.forms[0].TEMAIL.value
		var urlpath = "https://" + sgvsarc_site_secure + "/userinfo.asp?email=" + email;
		var OPN_wn
		OPN_wn = window.open("","SGVEMAIL","scrollbars=yes,resizable=1,width=570,height=680");
		OPN_wn.location = urlpath;
		
	}

		
	return false;
}

function popupflowanim(proto, path)
{
	var		wn, w, h;

	if ( window.screen != null )
	{
		w = Math.max( window.screen.availWidth, 1024);
		h = Math.max( window.screen.availHeight, 768);
	}
	else
	{
		w = 1024;
		h = 768;
	}

	wn = window.open( proto + sgvsarc_site + path,
					  "SlidesWindow", "toolbar=no, scrollbars=yes, width=" + w + ", height=" + h + ", location=no, status=no menubar=no, resizable=yes, top=0, left=0" );
}



