// for popups
function oxiosup(module, height, width) {
	window.open( "/index.php?page=" + module, "BethlehemMatrimonial", "status = 1, height = " + height + ", width = " + width + ", left=2, top=2, resizable = 0" );
}

function oxiosupfoto(module, height, width) {
	window.open( "/index.php?page=" + module, "BethlehemMatrimonialPhoto", "status = 1, height = " + height + ", width = " + width + ", left=2, top=2, resizable = 0" );
}

function oxiosupNew(module, height, width) {
	window.open( "/index.php?page=" + module, "BethlehemMatrimonial1", "status = 1, height = " + height + ", width = " + width + ", left=2, top=2, resizable = 0" );
}

// for popups
function oxiosupControl(module, height, width) {
	window.open( "/controlbeth123/index.php?page=" + module, "BethlehemMatrimonial2", "status = 1, height = " + height + ", width = " + width + ", left=2, top=2, resizable = 0, scrollbars=1" );
}

function oxiosupBranch(module, height, width) {
	window.open( "/branchBeth/index.php?page=" + module, "BethlehemMatrimonial2", "status = 1, height = " + height + ", width = " + width + ", left=2, top=2, resizable = 0, scrollbars=1" );
}

// for checkall / uncheck all
function sellAll(tot) {
	if(document.getElementById('selectAll').checked == true) {
		for (i = 1; i <= tot; i++)
			document.getElementById('smsg'+i).checked = true ;
	} else if(document.getElementById('selectAll').checked == false) {
		for (i = 1; i <= tot; i++)
			document.getElementById('smsg'+i).checked = false ;
	}
}
function sellAllChk(tot) {
	var allChk = 1;
	for (i = 1; i <= tot; i++) {
		if(document.getElementById('smsg'+i).checked == false) {
			document.getElementById('selectAll').checked = false;
			allChk = 0;
		}
	}
	if(allChk == 1) {
		document.getElementById('selectAll').checked = true;
	}
}

/*
// constants to define the title of the alert and button text.
var ALERT_TITLE = "BethlehemMatrimonial.com";
var ALERT_BUTTON_TEXT = "OK";

// over-ride the alert method only if this a newer browser.
// Older browser will see standard alerts
if(document.getElementById) {
	window.alert = function(txt) {
		createCustomAlert(txt);
	}
}

function createCustomAlert(txt) {
	d = document;

	if(d.getElementById("modalContainer")) return;

	mObj = d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));
	mObj.id = "modalContainer";
	mObj.style.height = d.documentElement.scrollHeight + "px";
	
	alertObj = mObj.appendChild(d.createElement("div"));
	alertObj.id = "alertBox";
	if(d.all && !window.opera) alertObj.style.top = document.documentElement.scrollTop + "px";
	alertObj.style.left = (d.documentElement.scrollWidth - alertObj.offsetWidth)/2 + "px";
	alertObj.style.visiblity = "visible";

	h1 = alertObj.appendChild(d.createElement("h1"));
	h1.appendChild(d.createTextNode(ALERT_TITLE));

	msg = alertObj.appendChild(d.createElement("p"));
	//msg.appendChild(d.createTextNode(txt));
	msg.innerHTML = txt;

	btn = alertObj.appendChild(d.createElement("a"));
	btn.id = "closeBtn";
	btn.appendChild(d.createTextNode(ALERT_BUTTON_TEXT));
	btn.href = "#";
	btn.focus();
	btn.onclick = function() { removeCustomAlert();return false; }

	alertObj.style.display = "block";
	
}

function removeCustomAlert() {
	document.getElementsByTagName("body")[0].removeChild(document.getElementById("modalContainer"));
}
*/