// JavaScript Document



function PopWindow(URL,height,width)
 {
   hWindow = window.open(URL,height+width,"width="+width+",height="+height+",'NDTV',resize=no,resizable=no,scrollbars=yes,menubar=no,status=no");
   hWindow.focus();
}
// this function opens the popoup window
function WinOpenS(winname,w,h,leftcor,topcor,pname)
{
	window.open( pname , winname, "scrollbars=1,statusbar=no,menubar=no,toolbar=no,resize=null,top=" + topcor + ",left=" + leftcor + ",width=" + w + ",height="+h ).focus();
}
// this function opens the popoup window
function WinOpenFull(winname,w,h,leftcor,topcor,pname)
{
	window.open( pname , winname, "scrollbars=0,statusbar=no,menubar=no,toolbar=no,resizable=no,top=" + topcor + ",left=" + leftcor + ",width=" + w + ",height="+h ).focus();
}
//This For Pop Up With ScrollBar
function WinOpen_withScroll(pageTitle,_width,_height,leftcor,topcor,pageSRC)
{
	window.open( pageSRC , pageTitle, "scrollbars=1,statusbar=no,menubar=no,toolbar=no,resize=null,top=" + topcor + ",left=" + leftcor + ",width=" + _width + ",height="+_height ).focus();
}
//This For Pop Up Without ScrollBar
function WinOpen_Full(pageTitle,_width,_height,leftcor,topcor,pageSRC)
{
	window.open( pageSRC , pageTitle, "scrollbars=0,statusbar=no,menubar=no,toolbar=no,resizable=no,top=" + topcor + ",left=" + leftcor + ",width=" + _width + ",height="+_height ).focus();
}

function IsEmailValid(email)
{
	email = trim(email);
	valid_chars_for_email = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-@.";
	if ( email == "" )			// pending Email validation
	{
		return false;
	}
	for ( i=0; i < email.length; i++ )
	{
		ch =  "" + email.charAt(i);
		num = valid_chars_for_email.indexOf(ch);
		if ( num == -1 )
		{
			return false;
		}
	}
	if ( email.indexOf('@') == -1 )
	{
		return false;
	}
	if ( email.indexOf('.') == -1 )
	{
		return false;
	}
	return true;
}

