									
// Global Variables
self.name = "mainwindow";

var ie4=document.all;
var ns6=document.getElementById&&!document.all;

// Check if website isn't run in other page
if (top!=self) top.location=self.location;

// Cross-Browser Scripts
if (!document.getElementById && document.all) {
	document.getElementById = function(id) {
		return document.all[id];
	}
}
else if (document.layers) {
	document.getElementById = function(id) {
		return eval('document.'+id);
	}
}
else if (!document.getElementById && !document.all) {
	document.getElementById = function(id) {
		// Very old browser. We do this so that
		// object.style keeps working (but
		// without doing anything)
		return { style: {} };
	}
}

// Encoding functions
function encodePoint(value) {
	str=value;
	str=str.replace(/\./g,'%2E');
	return str;
}

function decodePoint(value) {
	str=element.value;
	str=str.replace(/%2E/g,'.');
	return str;
}

function encodePlus(value) {
	str=value;
	str=str.replace(/\+/g,'%2B');
	return str;
}

function decodePlus(value) {
	str=value;
	str=str.replace(/%2B/g,'+');
	return str;
}

function openListBuilder(url)
{
popupWin = window.open(url, 'openWin', "width=400, height=250, scrollbars=yes, resizable=yes");
}

function validate()
{
	if (document.frm1.elements[0].type == "text")
	{
		if ( document.frm1.elements[0].value == "" )
		{
			document.frm1.elements[0].focus();
			
			alert("Please enter appropriate value for Email");
			return false;
		}	
	}
	if ( !isemail( document.frm1.fldEmail.value) )
	{
		 document.frm1.fldEmail.focus();
		 alert("Please Correct Email ID");
		 return false;
	}
	return true;
}

function doSubmit(){
	if (validate())
	{
	 document.frm1.submit();
	}
}