//utilities.js

function goInternational(sURL)
{
if (sURL != "")
	document.location.href = sURL;
}
// change to false if no confirmation message desired
confirm_click=false;

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Function to check for null in search criteria. 
// Added - LBS 09/19/00
function validateCriteria(sCriteria){
        if ("" == sCriteria.value)
	{
		alert('Please enter text in the search field before clicking on search.');
		return false;
	}
	else
		return true;
}

// Function for javascript pop ups
// Added - AC 03/01/02
function popup(theURL, winName, attrbList) {
 window.open(theURL, winName, attrbList);
}
// Function for small pop up window for graphics
// Added - AE 05/14/02
function popOpen(url, width, height) {
        var Win = window.open(url,'popOpen','width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubar=yes,status=yes' );
}


// Used for styled CSS buttons
function buttonStyle(obj, new_style) {
	obj.className = new_style;
}

// Function to validate an email address
// Added - AE 07/17/03
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){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
}

// Function to open a popup window with unzip info for developer
// Added by LBS 10/14/03 (created by Andrew Chapman)

function LogDownload(sURL) {
		childWin = window.open("/developer/UnlockZipInfo.htm?sURL=" + sURL, "childWindow", "width=700, height=550, resizable=yes");
		childWin.focus();
}

// Function to open a popup window for license agreement for developer self-extracting zip files
// Added by LBS 10/20/03 (created by Andrew Chapman)

<!--
								
function NewDownload(sURL) {
	childWin = window.open("/developer/component_exchange/Redirector.htm?sURL=" + sURL, "childWindow", "width=700, height=550");
	childWin.focus();
}

					

// End of File