var state = 'none';

function showhide(layer_ref) {

if (state == 'block') {
state = 'none';
}
else {
state = 'block';
}
if (document.all) { //IS IE 4 or higher
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById &&!document.all) {
hza = document.getElementById(layer_ref);
hza.style.display = state;
}
}

function createWindow(cUrl,cName,cFeatures) {
	var xWin = window.open(cUrl,cName,cFeatures)
	}

function clearText(thefield) {
        if (thefield.defaultValue == thefield.value)
                thefield.value = ""
        else thefield.value = thefield.defaultValue
}


function calcHeight()
{
	//var the_height=document.frames['the_iframe'].document.body.scrollHeight;//find the height of the internal page
	var the_height=document.getElementById('the_iframe').contentWindow.document.body.scrollHeight;//find the height of the internal page

	//document.getElementById('the_iframe').style.height=the_height;//change the height of the iframe
	document.getElementById('the_iframe').height=the_height;//change the height of the iframe
}

function resize_iframe()
{

	var height=window.innerWidth;//Firefox
	if (document.body.clientHeight)
	{
		height=document.body.clientHeight;//IE
	}
	//resize the iframe according to the size of the
	//window (all these should be on the same line)
	document.getElementById("glu").style.height=parseInt(height-document.getElementById("glu").offsetTop-195)+"px";
}

function submitForm() {
	document.pageform.submit();
}

