// JavaScript Document
// Aqui estan resueltas todas las funciones de JS - Mariano 06 Junio 2009
	var win=null;

	function SiDescarga(file)
	{
		location.href="/descargas/"+file;
	}
	
	function panel(site)
	{
		var url="admin/index.php?modo="+site;
		
		NewWindow(url,'home','850','650','no','center');
	}
	
	function RecuPass()
	{
		var url="popups/recupera.php";
		NewWindow(url,'home','600','450','no','center');
	}

	function TelUtils()
	{
		NewWindow('popups/telsutil.php','home','605','500','yes','center');
	}

	function NewWindow(mypage,myname,w,h,scroll,pos)
	{
		if(pos=="random")
		{
			LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
			TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
		}
		
		if(pos=="center")
		{
			LeftPosition=(screen.width)?(screen.width-w)/2:100;
			TopPosition=(screen.height)?(screen.height-h)/2:100;
		}
		
		else if((pos!="center" && pos!="random") || pos==null)
		{
			LeftPosition=0;TopPosition=20;
		}
		settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+			',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
		win=window.open(mypage,myname,settings);
		win.focus();
	}


	function mOvr(src,clrOver)
	{
		if (!src.contains(event.fromElement)) 
		{
			src.style.cursor = 'hand';
			src.bgColor = clrOver;
		}
	}
	
	function mOut(src,clrIn)
	{
		if (!src.contains(event.toElement))
		{
			src.style.cursor = 'default';
			src.bgColor = clrIn;
		}
	}
	
	function mClk(src)
	{
		if(event.srcElement.tagName=='TD')
		{
			src.children.tags('A')[0].click();
		}
	}
	
	

//*************************************************************************************************************
function disableselect(e){
return false
}
//*************************************************************************************************************
function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
//*************************************************************************************************************
function statusco()
{
window.status = " .: Autoescuela Oscar :.";
}
statusco();
//*************************************************************************************************************
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//*************************************************************************************************************
function MM_reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//*************************************************************************************************************
function disableRightClick(e)
{
  var message = "Botón derecho deshabilitado";
  
  if(!document.rightClickDisabled) // initialize
  {
    if(document.layers) 
    {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
  }
  if(document.layers || (document.getElementById && !document.all))
  {
    if (e.which==2||e.which==3)
    {
      //alert(message);
      return false;
    }
  }
  else
  {
    //alert(message);
    return false;
  }
}
disableRightClick();
//*************************************************************************************************************
function errorsuppressor(){
return true;
}
window.onerror=errorsuppressor;
//*************************************************************************************************************
document.onkeydown = function(){  
    if(window.event && window.event.keyCode == 114){ 
     window.event.keyCode = 503;  
    } 
    if(window.event && window.event.keyCode == 503){  
     return false;     
    }  
   }  

