
function initMenuRollovers() {
	if (!document.getElementById) return
	
	var sTempSrc;
	var aTD = document.getElementsByTagName('td');

	for (var i = 0; i < aTD.length; i++) {		
		if (aTD[i].className == 'TDMenu') {
			
			aTD[i].onmouseover = function() {
				this.className='TDMenuh';
			}	
			
			aTD[i].onmouseout = function() {
				this.className='TDMenu';
			}
		}
	}
}
//window.onload = initMenuRollovers;

function rollOver(id) {
    id.className='TDMenuh';
     
    document.onmouseout= function() {
	id.className='TDMenu';
  }
}


function scrollUp(layerName){
	new Effect.DropOut(layerName);
}
function scrollDown(layerName){
	new Effect.Appear(layerName);
}
function getPage(pageName, layerName){
	new Effect.Fade(layerName,{
				afterFinish:function(){
					new Ajax.Updater(layerName, pageName, {
						asynchronous:true,method:'get',onComplete:function(){
							scrollDown(layerName);
			}});
	}});
}

var sCall = function(t){
	$('statusDiv').innerHTML="returned: " + t.responseText;
}
var sFail = function(t){
	alert(t.statusText);
}

function submitShowForm(zform){
	alert('here in submitShowForm');
	var args = Form.serialize(zform);
	var webTarget = 'http://alitheia.com/siteAdmin/update.php?'+ args;
	$('statusDiv').innerHTML = webTarget;
	alert('created form');
	new Ajax.Request(webTarget,{method:'post',
				onComplete:sCall,
			onFailure:sFail});
			
};

function loadForm(){
	alert('here');
	var zform = $('zForm1');
	var args = Form.serialize(zform);
	var webTarget = 'http://alitheia.com/v-cgi/forms.cgi?'+ args;
	$('statusDiv').innerHTML = webTarget;
	
	new Ajax.Request(webTarget,{method:'POST',
				onComplete:sCall,
			onFailure:sFail});
};



