// JavaScript Document

function UrlSelOption(pSel,pPath){
	var url
	url = pSel.options[pSel.selectedIndex].value
	if(url!==null && url!=="" && url!='none'){
		if(url.indexOf('http')==0||url.indexOf('ftp')==0)
			window.open(url)
		else
			window.open((pPath) ? pPath+url : url)
	}
}

function mostrarFecha() {
	var mydate=new Date()
	var year=mydate.getYear()
	if (year < 1000)
		year+=1900
	var day=mydate.getDay()
	var month=mydate.getMonth()
	var daym=mydate.getDate()
	if (daym<10)
	daym="0"+daym
	var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
	var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
return(dayarray[day]+", "+daym+" de "+montharray[month]+" del "+year)
}

function ventanaSecundaria (URL){ 
   window.open(URL,"ventana","width=450,height=270,scrollbars=NO") 
  } 


var domainroot="www.ugel06.gob.pe"

var searchaction=[ //form action for the 3 search engines
"http://www.google.com/search",
"http://search.yahoo.com/search",
"http://search.msn.com/results.aspx"
]

var queryfieldname=["q","p","q"] //name of hidden query form for the 3 search engines

function switchaction(cur, index){
cur.form.action=searchaction[index]
document.getElementById("hiddenquery").name=queryfieldname[index]
}

function jksitesearch(curobj){
for (i=0; i< document.jksearch.se.length; i++){ //loop through radio to see which is checked
if (document.jksearch.se[i].checked==true)
switchaction(document.jksearch.se[i], i)
}

document.getElementById("hiddenquery").value="site:"+domainroot+" "+curobj.qfront.value

}


function mostrarText(){
if(document.getElementById||document.all){
document.write('<div class="text-scroll" style="position:relative;overflow:hidden;width:'+swidth+'px;height:'+sheight+'px;clip:rect(0 '+swidth+'px '+sheight+'px 0)" onmouseover="sspeed=0;" onmouseout="sspeed=restart;">');
if(gekso==0&&operbr==-1) document.write('<div id="iens6div" style="position:absolute;height:'+sheight+'px;"></div>');
else document.write('<div id="iens6div" style="position:relative;height:'+sheight+'px;"></div>');
}
}