function mOvr(src,clrIn) {//on mouse in
	src.style.cursor = 'hand';
	src.bgColor = clrIn;	
	}
function mOut(src,clrIn) {// on mouse out
	src.style.cursor = 'default';
	src.bgColor = clrIn;
	}
function mClk(src) {//on click
	//src.bgColor = "#ffcc99";
	}
function VerSINO(oItems)
{
	var objDiv = document.getElementById(oItems);
    if (objDiv.style.display == "") {
		objDiv.style.display = "none";
	} else {

		objDiv.style.display = "";
	}
}

function activarCampo(id){
	get(id).disabled="";
	}
function showSaved(){
	$('savedMsg').style.display='';
	new Effect.Pulsate($('savedMsg'),{direction: 'top-left'});
	setTimeout("new Effect.Fade($('savedMsg'),{direction: 'top-left'});",2000);
	}
function saveVal(obj,params,dFile,fieldP){
	//get(obj.id).disabled="disabled";
	var xP = 'logic=updateInPlace&fieldP'+fieldP+'&'+params;
	xP += '&name=' + fieldP;
	xP += '&value=' + escape(obj.value);
	var exec = 'activarCampo(\'' + obj.id + '\');showSaved();';
//	alert(dFile+'|'+xP);
	goAJAX('',dFile,xP,exec,'','0','0');
	}
	
	
var menuIsVisible='0';
function showMenu(){
	if(menuIsVisible=='0'){
		$('sMenu').style.margin_top='0';
		new Effect.SlideDown('sMenu', { duration: 0.3 });
		 menuIsVisible='1';
		}
	}
function hideMenu(){
	if(menuIsVisible=='1'){
		menuIsVisible='0';
		new Effect.SwitchOff('sMenu', { duration: 0.2 });
		}
	}
function showSysWindow(winName,winTitle,winDiv,File,w,h){
 	if(!isDefined(get(winName))){
  var win = new Window({id: winName, className: "alphacube", title: winTitle, width:w, height:h, wiredDrag: true,showEffectOptions:{duration:'0.5'},hideEffectOptions:{duration:'0.5'}}); 
  win.setDestroyOnClose(); 
  win.showCenter();
  win.setConstraint(true, {left:0, right:0, top: 30, bottom:10});
  win.toFront();
  win.setHTMLContent('<div id="'+winDiv+'"></div>');
  
  goAJAX(winDiv,File);
	}else{
			get(winName).toFront;
			}

}
function showWin(href,title,w,h){
	if(!isDefined(w)||(w=='')){w=600;}
	if(!isDefined(h)||(h=='')){h=400;}
	var winTitle='win'+str_replace(' ','',title);
	var divTitle='div'+str_replace(' ','',title);
	href=href+'&hwnd='+Math.floor(Math.random( ) * 999 - 2) + 1;
	showSysWindow(winTitle,title,divTitle,href,w,h);
	return false;
	}
function tickets(){
	Dialog.alert({url: "tickets.php", options: {method: 'get'}}, {className: "alphacube", width:850, okLabel: "Close"});
	setTimeout('hideMenu();',2000);
	}