
//javascript:window.history.forward(1); //disables the browser back button

function pop(url, name)
{
	var w	= eval(screen.width - 200);
	var h	= eval(screen.height - 200);
	var opt	= "top=0,left=0,scrollbars=yes,status=yes,width=" + w + ",height=" + h + ",resizable=no,titlebar=0,hotkeys=0";
	window.open(url, "", opt);
}

function ChangeLanguageInEnroll(langcode, langid, url) {
	document.Form1.txt_LangCode.value = langcode;
	document.Form1.txt_LangID.value = langid;
	document.Form1.txt_Confirm.value = "";
	document.Form1.action = url;
	document.Form1.txtRolesListSelectedItem.value = document.Form1.cboRoleList.selectedIndex;
   	document.Form1.submit();
   	}

function ChangeLanguageVTSearch(langcode, langid, url) 
{
	document.all["txt_LangCode"].value = langcode;
	document.all["txt_LangID"].value = langid;
	
	oObject = window.document.parentWindow.parent;
	
	if (oObject != null)
	{
		oObject.document.forms.item(0).target = "_parent";
		oObject.document.forms.item(0).action = url;
		oObject.document.forms.item(0).submit();
	}
	else
	{
		document.forms[0].action = url;
		document.forms[0].submit();
	}
}

	
 function ChangeLanguage(langcode, langid, url) {
	document.all["txt_LangCode"].value = langcode;
	document.all["txt_LangID"].value = langid;
	document.forms[0].action = url;
	document.forms[0].submit();
	}
 function testValidation(sender,arguments)
 {
	if(document.Form1.txt_titles.value == "")
	{
		alert("Please enter a title");
		arguments.IsValid = false;
		return;
	}
}

//Used in Enrollment Page to make the validators visible
function OnEnrollFormLoad()
{
	document.all["RqfNameValidator"].style.visibility = "hidden";
	document.all["RqlNameValidator"].style.visibility = "hidden";
	////document.all["RqotherRoleValidator"].style.visibility = "hidden";
	
	//document.all["RqemailValidator"].style.visibility = "hidden";
	//document.all["RqCCodeValidator"].style.visibility = "hidden";
	//document.all["RqAreaCodeValidator"].style.visibility = "hidden";
	//document.all["RqPhoneNumberValidator"].style.visibility = "hidden";
}

function OnEnrollFormSubmit()
{
    var r_msg = "";
    document.all["RqfNameValidator"].style.visibility = "visible";
	document.all["RqlNameValidator"].style.visibility = "visible";
	////document.all["RqotherRoleValidator"].style.visibility = "visible";
	
	//document.all["RqemailValidator"].style.visibility = "visible";
	//document.all["RqCCodeValidator"].style.visibility = "visible";
	//document.all["RqAreaCodeValidator"].style.visibility = "visible";
	//document.all["RqPhoneNumberValidator"].style.visibility = "visible";
	r_msg = checkRole2();
	if ( r_msg != "" )
	{
	   document.all["otherRoleValidator"].innerHTML = "";
	   document.all["RoleErrMsgLabel"].innerHTML = r_msg;
	   return false;
	}
	else
	{
	   return true;
	}   
}

function doRedirect(constStr)
{
	window.location = constStr;
}
 
 