function newWinLinks(strName){
//var strPath=location.href;
var lf=screen.width-screen.height;
var strOptions="resizable=yes,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,height=" + (screen.height-lf) + ",width=" + (screen.width-lf) + ",top=0,left=" + (screen.width/2)/4;
//strPath=strPath.substr(0,strPath.lastIndexOf("/")) + strName;
//strPath=strName;
var newWinLinks = window.open(strName,'',strOptions);
}

function popWindow(strName){ 
	var lf=screen.width-screen.height;
	var strOptions = "resizable=yes,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,height=650,width=1024,top=0,left=0"//" + (screen.width / 2) / 4;
	var popWindow = window.open(strName,'',strOptions);
}

function popVideoWindow(strName) {
    //var lf = screen.width - screen.height;
    var strOptions = "resizable=no,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,height=500,width=600,top=10,left=" + (screen.width / 2) / 4;
    var popWindow = window.open(strName, '', strOptions);
}

function popWriteWindow(strName){
	var lf=screen.width-screen.height;
	var strOptions="resizable=no,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,height=400,width=" + (screen.width-lf) + ",top=10,left=" + (screen.width/2)/4;
	var popDownloadWindow = window.open(strName, '', strOptions);
	popDownloadWindow.document.write(strName);
}

//check for email verifaction
function isEmail(str) 
{
	  // are regular expressions supported?
	  var supported = 0;
	  if (window.RegExp) 	  
	  {
	    var tempStr = "a";
	    var tempReg = new RegExp(tempStr);
	    if (tempReg.test(tempStr)) supported = 1;
	  }
	  if (!supported)
	    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	  return (!r1.test(str) && r2.test(str));
	}
	//The following function checks if a string is an unsigned integer
	function isNumeric(stringin) {
	    var i
	    for (i = 0; i <= stringin.length - 1; i++) {
	        if (isNaN(parseInt(stringin.charAt(i)))) {
	            return false;
	        }
	    }
	    return true;
	}

	function isDate(day, month, year, strMsg) {
	 	var today = new Date();
	    year = ((!year) ? y2k(today.getYear()) : year);
	    month = ((!month) ? today.getMonth() : month - 1);
	    if (!day) return false
	    var test = new Date(year, month, day);
	    if ((y2k(test.getYear()) == year) &&
         (month == test.getMonth()) &&
         (day == test.getDate()))
	        return true;
	    else {
	        alert("Enter Valid" + strMsg + "Date");
	        return false
	    }
	}
	//Check for valid Date format(dd-MMM-yyyy)
	function validNdate(varBdate, strMsg) {
	    var strBdate = varBdate.split('-');
	    if (strBdate.length != 3) {
	        alert("Enter valid " + strMsg + " Date");
	        return true;
	    }
	    else if (isNumeric(strBdate[0]) == false || isNumeric(strBdate[2]) == false) {
	        alert("Enter valid " + strMsg + " Date");
	        return true;
	    }
	    else if (strBdate[0].length != 2 || strBdate[1].length != 3 || strBdate[2].length != 4) {
	        alert("Entered " + strMsg + " Date format is wrong, please check the format");
	        return true;
	    }
//	    else if (isDate(strBdate[0], returnMonth(strBdate[1]), strBdate[2], strMsg) == false) {
//	        return true;
//	    }
	    else
	        return false;
	}
	
//	<!-- PreLoad Wait - Script -->
//<!-- This script and more from http://www.rainbow.arch.scriptmania.com 

function waitPreloadPage() { //DOM Prepage Loading
if (document.getElementById){
    document.getElementById('adBodyBlankVideo').style.visibility = 'hidden';
}else{
if (document.layers){ //NS4
    document.adBodyBlankVideo.visibility = 'hidden';
}
else { //IE4
    document.all.adBodyBlankVideo.style.visibility = 'hidden';
}
}
}
