function openpage( page) {
	window.location.href=page;
}
function aaa( ) {
	OpenWin = this.open( "underconstruction.html", "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=180,height=190");
}
function we( ) {
	OpenWin = this.open( "whoweare.html", "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=400,height=480");
}
function changePaymentStatus( id) {
	OpenWin = this.open( "changeRepClientPaymentInvoiceStatus.php?item="+id, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=180,height=190");
}
function changeClientStatus( id, purch) {
	OpenWin = this.open( "changeRepClientCardStatus.php?item="+id+"&purchase="+purch, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,width=240,height=320");
}
function refreshOpener( addr) {
	self.opener.location.href=addr;
}
function nothing() {
}
function findanswer( id) {
	formobj = document.getElementById('help');
	formobj.searchid1.value = id;
	t = formobj.searchid1.value;
//	alert("Search : "+t+" & Question ID# : "+id);
	formobj.search.click();
}
function goBack() {
	h = window.history; 
	if ( h.length ) { // if there is a history 
	    h.back();     // equivalent to clicking back button 
	}
}
/***********************************************
* Required field(s) validation v1.10- By NavSurf
* Visit Nav Surf at http://navsurf.com
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
function phoneCheckForm( formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("newphone1", "newphone2", "newphone3");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("Area Code", "First part of the Phone Number", "Second part of the Phone Number");
	// dialog message
	var alertMsg = "Please complete the following fields:\n";
	var l_Msg = alertMsg.length;
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}
	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}

