
<!--IDENTIEK 


function ShowTimeoutWarning ()
{
    window.alert( " U bent nu bijna 2 uur inactief. Gelieve een andere pagina te openen, anders wordt Uw verbinding verbroken!" );
}
function ShowTimeoutWarningReply ()
{
    window.alert( " U bent nu bijna 2 uur inactief. Gelieve te verzenden anders wordt Uw verbinding verbroken!" );
}

function ShowTimeout ()
{
    window.alert( " Uw verbinding is verbroken!                              Kopieer Uw antwoord,  meld opnieuw aan, plak de tekst en verzend.                             Daarna zal U Uw bericht terugvinden onder Favorieten/Post" );
}



function selectcat(ipage) {

	oform = document.cat;
	catID = oform.ccat.options[oform.ccat.selectedIndex].value;
	window.location = ipage+"?catid="+catID;

}

function selectsubcat(ipage) {

	oform = document.cat;
	catID = oform.ccat.options[oform.ccat.selectedIndex].value;
	subcatID = oform.cscat.options[oform.cscat.selectedIndex].value;
	window.location = ipage+"?catid="+catID+"&subcatID="+subcatID;

}

function select3rdcat(ipage) {

	oform = document.cat;
	catID = oform.ccat.options[oform.ccat.selectedIndex].value;
	subcatID = oform.cscat.options[oform.cscat.selectedIndex].value;
	cat3rdID = oform.csscat.options[oform.csscat.selectedIndex].value;
	window.location = ipage+"?catid="+catID+"&subcatID="+subcatID+"&3rdcatID="+cat3rdID;

}


function validateInput() {

	var errorm = "";
	var oform = document.register;

	var nick = oform.R1.value.replace(/[\s<>']/g, "");
	oform.R1.value = nick
	
	var name = oform.R2.value.replace(/[<>']/g, "");
	oform.R2.value = name
	
	var fname = oform.R3.value.replace(/[<>']/g, "");
	oform.R3.value = fname
	
	var city = oform.R4.value.replace(/[<>']/g, "");
	oform.R4.value = city
	
	var postal = oform.R42.value.replace(/[<>']/g, "");
	oform.R42.value = postal
	
	var moeder = oform.moeder.value.replace(/[<>']/g, "");
	oform.moeder.value = moeder
	
	//var jaar = oform.BsJaar.value.replace(/[<>']/g, "");
	//oform.BsJaar.value = jaar
	
	var street = oform.R5.value.replace(/[<>']/g, "");
	oform.R5.value = street
	
	var email = oform.R6.value.replace(/[\s<>']/g, "");
	var email2 = oform.R6r2.value.replace(/[\s<>']/g, "");
	
	var pass = oform.R7.value.replace(/[\s<>]/g, "");
	oform.R7.value = pass
	
	var cpass = oform.R8.value.replace(/[\s<>]/g, "");
	oform.R8.value = cpass
	
	var sexe = oform.uO0.value.replace(/[\s<>]/g, "");
	oform.uO0.value = sexe
	
	var cstate = oform.uO1.value.replace(/[\s<>]/g, "");
	oform.uO1.value = cstate
	
	var age = oform.uO2.value.replace(/[\s<>]/g, "");
	oform.uO2.value = age
	
	var studies = oform.uO3.value.replace(/[\s<>]/g, "");
	oform.uO3.value = studies
	
	var statuut = oform.uO4.value.replace(/[\s<>]/g, "");
	oform.uO4.value = statuut

   // var detail = oform.mijnjob.value.replace(/[\s<>]/g, "");
	//oform.mijnjob.value = detail
	
 //  var BSMaand = oform.BsMaand.value.replace(/[\s<>]/g, "");
//	oform.BSMaand.value = BSMaand
	
	
	var ePat = /^([\w-\.]+)@([\w-]+)\.([\w-\.]+)$/g;
	
	var matchEmail=email.match(ePat);
	
	var nLen = nick.length;
	
	var pLen = pass.length;


if (nick=="" | email=="" | postal=="" | city==""| street=="" | name == "" | fname == ""|cstate == ""|  moeder==""  ) 
	{
		var errorm = errorm + ("    1 of meerdere verplichte velden zijn niet ingevuld!     \n");
		var trap = ("error");
	}
	
		if ( pass == "" | cpass == "") 
	{
		var errorm = errorm + ("    Uw paswoorden zijn niet ingevuld!     \n");
		var trap = ("error");
	}



	if (email != "") {
		if (matchEmail == null){
			var errorm = errorm + ("   Dit  Emailadres is niet correct!     \n");
			var trap = ("error");
		}
	}
	
	if (email != email2) {
		var errorm = errorm + ("    De emailadressen zijn verschillend!     \n");
		var trap = ("error");
	}
	
	if (nick != "") {
		if (nLen < 4){
			var errorm = errorm + ("   Uw schuilnaam dient minstens 4 karakters lang te zijn!     \n");
			var trap = ("error");
		}
	}

	if (pass != "") {
		if (pLen < 6){
			var errorm = errorm + ("  Het paswoord dient minstens 6 karakters te zijn!     \n");
			var trap = ("error");
		}
	}

	if (pass != cpass) {
		var errorm = errorm + ("    Paswoorden zijn niet gelijk!     \n");
		var trap = ("error");

	}
	
//	if (sexe == "kies") 
	{
	//	var errorm = errorm + ("  Gelieve Uw geslacht  in te vullen     \n");
	//	var trap = ("error");
	}
	
//	if (cstate == "kies") 
	{
	//	var errorm = errorm + ("    Gelieve geboortedatum in te vullen    \n");
	//	var trap = ("error");
	}
	
	//if (age == "kies") 
	{
	//	var errorm = errorm + ("    Gelieve Uw geboortedatum in te vullen     \n");
	//	var trap = ("error");
	}
	
//	if (studies == "kies") 
	{
	//	var errorm = errorm + ("    Gelieve Uw studies in te vullen     \n");
	//	var trap = ("error");
	}
	
	//if (statuut == "kies") 
	{
		//var errorm = errorm + ("    Gelieve  Uw beroep in te vullen   \n");
		//var trap = ("error");
	}

	
	for (i=0; i < 6; i++) {
		if (document.getElementById("z"+i) != null && isNaN(document.getElementById("z"+i).value)){
			var nan = document.getElementById("z"+i).value
			var errorm = errorm + ("    -- Deze waarde ["+nan+"] is fout. Dit moet een nummer zijn!     \n");
			var trap = ("error");
		}
	}


	if (trap == "error") {
		alert ("Gelieve volgende vergissingen te herstellen en daarna opnieuw te verzenden:\n\n" + errorm);
	} else {
		oform.B1.disabled = true;
		oform.submit();
	}
}

function ulogon(oform, eform) {

	var email = eform.value;
	var ePat = /^([\w-\.]+)@([\w-]+)\.([\w-\.]+)$/g;
	var matchEmail = email.match(ePat);

	if (email == "" | matchEmail == null) {
		alert("    -- De OPBOUW van dit emailadres is fout!     \n");
		return;
	}
	oform.submit();
}

function usrmgr(oForm, iAction, user) {

	switch (iAction) {

		case "moderator":
			if (window.confirm("You are about to change an account status for user <"+user+">.")) {
				oForm.itask.value = iAction;
				oForm.submit();		
			}
		break;

		case "maillist":
			if (window.confirm("You are about to change an Email List participation status for user <"+user+">.")) {
				oForm.itask.value = iAction;
				oForm.submit();		
			}
		break;

		case "add_credit":
			if (window.confirm("You are about to ADD credits for user <"+user+">.")) {
				oForm.itask.value = iAction;
				oForm.submit();		
			}
		break;

		case "remove_credit":
			if (window.confirm("You are about to REMOVE credits for user <"+user+">.")) {
				oForm.itask.value = iAction;
				oForm.submit();		
			}
		break;

		default:
			if (window.confirm("You are about to "+iAction+" account for user <"+user+">.")) {
				oForm.itask.value = iAction;
				oForm.submit();		
			}
	}

}

function popup(url,wname,params) {
	PopWin = window.open(url,wname,params);
	PopWin.focus();
}

function evalSize(iw,ih) {

	if (document.getElementById("uimage")!==null) {
		var osz=document.getElementById("sz");
		var oimage=document.getElementById("uimage");
		var w = oimage.width;
		var h = oimage.height;
		osz.innerHTML="Dimension: "+w+"x"+h+" px";
		if (w > iw | h > ih) {
			alert("The Image size is greater than maximum allowed: "+iw+"x"+ih+"px.\n\nPlease Select a different image.");
			document.img.isvalid.value="false";
		}else{
			document.img.isvalid.value="True";
			document.img.imgw.value = w;
			document.img.imgh.value = h;
		}

	}
}



function sendmail() {
	
	var errorm = "";
	var email = document.reply.R1.value;
	var ePat = /^([\w-\.]+)@([\w-]+)\.([\w-\.]+)$/g;
	var matchEmail=email.match(ePat);
	var message = document.reply.R2.value.replace(/[<>]/g, "");
	var mLen = message.length;
	var sname = document.reply.R3.value.replace(/[<>]/g, "");

	if (email == "" | message == "" | sname == "") {
		var errorm = errorm + ("    -- One of the required fields is empty!     \n");
		var trap = ("error");
	}


	if (mLen > 500){

		var errorm = ("    --The Message contains " + mLen + " characters. Only 500 allowed. Please revise!    \n");
		var trap = ("error");

	}

	if (email !== "") {
		if (matchEmail == null){
			var errorm = errorm + ("    -- Email format is invalid!     \n");
			var trap = ("error");
		}
	}

	if (trap == "error") {
		alert ("Please fix the following errors and resubmit:\n\n" + errorm);
	} else {
		 document.reply.submit();
	}

}

function searchAds() {

	var oform = document.search; 
	var sTarget = oform.SH3.options[oform.SH3.selectedIndex].text;
	oform.categoryName.value = sTarget;
	var searchStr = oform.SH1.value;
	var searchStr = searchStr.toLowerCase();

	// if (searchStr == "") {return alert("Please specify Keywords to search.");}
	oform.SH1.value = searchStr;
	oform.action = "search.asp"
	oform.submit();


}

function savePrefs(oform, action) {

	if (action == "pass") {
		oform.flag.value = "reset";
		var id = oform.P13.value;
		var pass = oform.P14.value;
		var conf = oform.P15.value;
		if (pass !== conf) { return alert("Password do not match!"); }
		if (id == "" | pass == "") {if (!window.confirm("Admin ID or Password is blank. Would you like to continue?")) return;}

	}else{
		oform.flag.value = "config";
	}

	oform.submit();
}

function bnDelete(oform)
{


	if (oform.options.length !==0){
		i=0;
		for (i=0; i < oform.options.length; i++) {
			if (oform.options[i].selected == true){
				if (window.confirm("Do you wish to DELETE banner "+oform.options[oform.selectedIndex].value+"?")) {
					window.location="filter.asp?url=admin_rotator.asp&act=13&b="+oform.options[oform.selectedIndex].value;
				}
				return false;
			}else{
				notselected = true;
			}
   		}
		if (notselected) {alert("No banner was selected.");}

	}else{
		alert("The available banners list is empty.");
	}

}

function savePaymentOptions(oform) {

	var ePat = /(\w+)@(\w+)\.(\w+)/;
	var email = oform.AP13.value
	var re = /\d+\.\d{2}/;
	for (var i=1; i<12; i++){
		var mch = re.exec(oform.elements["AP"+i].value);
		if (mch == null) {return alert("One or more of the price fields misconfigured. Make sure to use currency format. To set a price to 0 use 0.00");} 
		oform.elements["AP"+i].value = mch;
	}

	var matchEmail=email.match(ePat);
	if (matchEmail == null){return alert("Your PayPal Email Format is Invalid!");}
	if (oform.AP27.value=='' | isNaN(oform.AP27.value)) {return alert("One of the duration options is not a number or empty!");}
	if (oform.AP28.value=='' | isNaN(oform.AP28.value)) {return alert("One of the duration options is not a number or empty!");}
	if (oform.AP29.value=='' | isNaN(oform.AP29.value)) {return alert("One of the duration options is not a number or empty!");}
	if (oform.AP30.value=='' | isNaN(oform.AP30.value)) {return alert("One of the duration options is not a number or empty!");}
	oform.submit();
	

}



function checkAll(oChkBox)
{
var bStatus = oChkBox.checked;
var docFrm = document.forms["paylog"];
    for (i=0; i < docFrm.elements.length; i++) {
    	if (docFrm.elements[i].type == "checkbox") {
			docFrm.elements[i].checked = bStatus;
       }
    }
}

function createTemplate(oform) {

var name = oform.NT1.value.replace(/["']/g, "");  
var descr = oform.NT2.value.replace(/["']/g, "");
var subject = oform.NT3.value.replace(/["']/g, "");
var body = oform.NT4.value;
oform.NT1.value = name;
oform.NT2.value = descr;
oform.NT3.value = subject;
if (name == "" | descr == "" | subject == "" | body == "") {return alert("One of the fields is empty!");}
var type = oform.NT5.options[oform.NT5.selectedIndex].text;

if (window.confirm("You are about to create New '"+type+"' - '"+name+"'.")){oform.submit();}



}

//-->
