/********************************************************************************/
/*                                                                              */
/* Plataforma MurciaEduca.  Version 7.01.00-34 - Region de Murcia - Espana      */
/* Distribucion de e-ducativa Open College                                      */
/* Copyright (c) 2007-2008 de e-ducativa Educación Virtual S.A.                 */
/*                                                                              */
/********************************************************************************/
function setAsHomePage() {
if (document.all) {
	obj_pagina_inicio.style.behavior='url(#default#homepage)';
	obj_pagina_inicio.setHomePage('http://www.helvia.w');
} else {
	var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
	alert(prefs.getCharPref("browser.startup.homepage"));
}
}

function setAsBookMark() {
/* if( window.sidebar && window.sidebar.addPanel ) {
    //Gecko (Netscape 6 etc.) - add to Sidebar
    window.sidebar.addPanel( this.title, this.href, '' );
} else if( window.external && ( navigator.platform == 'Win32' ||
      ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) {
    //IE Win32 or iCab - checking for AddFavorite produces errors in
    //IE for no good reason, so I use a platform and browser detect.
    //adds the current page page as a favourite; if this is unwanted,
    //simply write the desired page in here instead of 'location.href'
    window.external.AddFavorite( location.href, document.title );
} else if( window.opera && window.print ) {
    //Opera 6+ - add as sidebar panel to Hotlist
    return true;
} else if( document.layers ) {
    //NS4 & Escape - tell them how to add a bookmark quickly (adds current page,
    //not target page)
    window.alert( 'Please click OK then press Ctrl+D to create a bookmark' );
} else {
    //other browsers - tell them to add a bookmark (adds current page, not target page)
    window.alert( 'Please use your browser\'s bookmarking facility to create a bookmark' );
}
//return false; */

if( window.sidebar && window.sidebar.addPanel ) {
	window.sidebar.addPanel( document.title, location.href, '' );
} else if( window.external && ( navigator.platform == 'Win32' || ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) {
	window.external.AddFavorite( location.href, document.title );
} else if( window.opera && window.print ) {
	return true;
} else if( document.layers ) {
	window.alert( 'Please click OK then press Ctrl+D to create a bookmark' );
} else {
	window.alert( 'Please use your browser\'s bookmarking facility to create a bookmark' );
}
//return false;
}
function OpenWinCont(url){
	newWinCont = window.open (url, 'Contenido','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=680,height=400');
	newWinCont.focus();
}
function AbrirMenu(target) {
  	obj=(document.all) ? document.all[target] : document.getElementById(target);
	if (obj){
	  	if (obj.style.display=='none') {
	  		obj.style.display = 'inline';
	  	} else {
	  		obj.style.display = 'none';
	  	}
	  	nro = target.substr(1,target.length - 1);
	  	for (i=1;i<pNroSecciones+1;i++) {

	      if (nro != i) {
		      obj=(document.all) ? document.all['S'+i] : document.getElementById('S'+i);
		      if (obj){
			      if (obj.style.display=='inline') {
			      	obj.style.display='none';
			      }
			  }
		    }
	    }
  	}

}
function VerNovedad2(url){
	if (url.indexOf("index.cgi?") >= 0) {
		location.href=url;
	}
	else {
		newWin = window.open (url,'novedad','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=no,width=640,height=480');
		newWin.focus();
	}
}
function OpenWinObras(url){
	newWinObras = window.open (url, 'Obras' ,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=680,height=400');
	newWinObras.focus();
}
function OpenWinPersona(url){
	newWin = window.open (url,'Persona','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=680,height=400');
	newWin.focus();
}
function VerNovedad2(url){
	if (url.indexOf("index.cgi?") > 0) {
		location.href=url;
	}
	else {
		newWin = window.open (url,'novedad','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=640,height=480');
		newWin.focus();
	}
}

function VerMensaje (img) {
		  foto1= new Image();
		  foto1.src=(img);
		  Controlla(img);
		}
		function Controlla(img){
		  if((foto1.width!=0)&&(foto1.height!=0)){
		    viewFoto(img);
		  }
		  else{
		    funzione="Controlla('"+img+"')";
		    intervallo=setTimeout(funzione,20);
		  }
		}
		function viewFoto(img){
		  largh=foto1.width+0;
		  altez=foto1.height+0;
		  stringa="width="+largh+",height="+altez+"resizable=auto";
		  if (img.match(/swf/)) {
			 // largh=foto1.width*6;
		 	 // altez=(foto1.height)*6;
		 	 stringa="resizable=auto";
		  }

		      MensajesWin=window.open(img,"",stringa);
				MensajesWin.document.write('<HTML><TITLE></TITLE><link rel="stylesheet" href="'+ pUbicacionCss +'" type="text/css">\n');
				MensajesWin.document.write('<BODY bgcolor="#ffffff" topmargin="0" leftmargin="0"><div align="center">');
				MensajesWin.document.write('<a href="javascript:window.close()">');
				if (img.match(/swf/)) {
					MensajesWin.document.write("<embed src\="+img+" quality=high type=application/x-shockwave-flash  value=exactfit height=100% width=100%></embed>"); //height=100% width=100%
				}
				else {

					MensajesWin.document.write('<img alt="imagen" src="' + img + '" border=0 alt="'+ img +'">"');
				}
				MensajesWin.document.write('</a>');

				MensajesWin.document.write('</HTML>');
				MensajesWin.focus();
		}

function mOvr(src,clrOver){if(!src.contains(event.fromElement)){src.style.cursor='pointer';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();}}
statuss();function statuss()
{
	/* window.status=".: Helvia :.";setTimeout("statuss()",1);*/

	}

function NuevaVentana(url){
	if (url.indexOf("index.cgi?") > 0) {
		location.href=url;
	}else {
		newWin = window.open (url);
		newWin.focus();
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


