// JavaScript Document
<!-- ************************************************Rediffmailpro login -->
var browserApp = navigator.appName;


function PasswdRemindWin()
{
	 window.open("http://www.netnivaran.com/Forgot your Password.htm","win1","toolbar=no,directories=no,resize=yes,menubar=no,location=no,scrollbars=yes,width=490,height=460,maximize=null,top=70,left=80");
}
function validate()
{
	var arg = "";
	var domainName = document.prologinform.domain.value;
	var userName = document.prologinform.user.value;
//	var dnTypeIndex = document.prologinform.dntype.selectedIndex;
//	var dnTypeIndex = document.prologinform.dntype.selectedIndex;
	
	var dnType = document.prologinform.dntype.value;
	var inThere = domainName.indexOf(".");

	if (inThere >= 0) {
		var domainName1 = domainName.substring(0,domainName.lastIndexOf('.'));

		dnType = domainName.substring(domainName.lastIndexOf('.'));

		arg = userName + "@" + domainName;
		domainName = domainName1;
		if(dnType == ".com")
			dnTypeIndex = 0;
		else if(dnType == ".net")
			dnTypeIndex = 1;
		else if(dnType == ".biz")
			dnTypeIndex = 2;
		else if(dnType == ".org")
			dnTypeIndex = 3;
		else if(dnType == ".info")
			dnTypeIndex = 4;
		else if(dnType == ".in")
			dnTypeIndex = 5;
		else if(dnType == ".net.in")
			dnTypeIndex = 6;
		else if(dnType == ".org.in")
			dnTypeIndex = 7;
		else if(dnType == ".co.in")
			dnTypeIndex = 8;
		else if(dnType == ".ac.in")
			dnTypeIndex = 9;
	}
	else {
		domainName += dnType;
		arg = userName + "@" + domainName;
	}

	document.prologinform.login.value = arg;
/*	if(document.prologinform.remme.checked){
		pathname = location.pathname;
		myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/';
		var largeExpDate = new Date ();
		largeExpDate.setTime(largeExpDate.getTime() + (365 * 24 * 3600 * 1000));
		SetCookie('Rpu',userName,largeExpDate,myDomain);
		SetCookie('Rpd',domainName,largeExpDate,myDomain);
		SetCookie('Rpt',dnTypeIndex,largeExpDate,myDomain);

	}*/
document.prologinform.action="https://www.rediffmailpro.com/cgi-bin/login.cgi";
document.prologinform.submit();
//	return true;

}

function SetCookie (name, value) {
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" +expires.toGMTString())) +((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain)) +((secure == true) ? "; secure" : "");
}


function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0)
		break;
	}
	return null;
}
function frmsubmit(frmname){
frmname.action="https://www.rediffmailpro.com/cgi-bin/login.cgi";
}
