
function checkform(forcheck,status) {

	check = new String(forcheck);
	check = check.split(";");
	
	delspace();

	for (i=0; i<check.length; i = i + 2) {

		checkinfo = (document.forms[0].elements[check[i]].value == check[i+1]) ? "true" : "false";
		if (checkinfo == "true") {
			alert('Please fill all fields!');
			break;
		}

	}
	
	if (checkinfo == "false") {
		updhid(status);
	}
	
}

function updform(status){

	document.forms[0].status.value = status;
	document.forms[0].submit();

}

function delspace() {

	temp = new String();
	formleng = document.forms[0].length;

	for (i=0; i<formleng; i++ )	{
		temp = document.forms[0].elements[i].value;
		temp = temp.replace(/\s+$/, "");
		temp = temp.replace(/^\s+/, "");
		document.forms[0].elements[i].value = temp;

	}
}

function updhid(val) {

	if (val) {
			
		value = new String(val);
		value = value.split(",");
	
		hidden = new Array;
		temp = new String;

		for (i=0; i < value.length; i++ ) {
	
			temp = value[i].split("=")
			hidden.push(temp[0]);
			hidden.push(temp[1]);
	
		}

		for (i=0; i<hidden.length; i = i + 2) {

			document.forms[0].elements[hidden[i]].value = hidden[i+1];
		}
	
	
	}
	
	document.forms[0].submit();
}

function wish()
{	
	window.open( "/cgi-bin/wish.cgi", "geozumer_wish", "width=345,height=460,status=no,scrollbars=no" );
}


function help()
{	
	window.open( "/help.php", "geo_help", "width=400,height=750,status=no,scrollbars=no" );
}


function per()
{	
	window.open( "/per.php", "geo_per", "width=400,height=360,status=no,scrollbars=no" );
}

function smsnot()
{	
	window.open( "/smsnot.php", "geo_smsnot", "width=400,height=360,status=no,scrollbars=no" );
}

function new_year_action()
{	
	window.open( "/ny_action.php", "geo_ny_action", "width=450,height=200,status=no,scrollbars=no" );
}

function winclose() {

	window.close();
}