<!--
var l, iq = new Array();
var q = new Array('btn_operar',	'btn_panorama',	'btn_usuarios',	'btn_mvc', 'btn_close', 'btn_start');
var p = new Array('','','','','sico/','sico/');

if (document.images) { for (x=0;x<q.length;x++) { iq[x] = new Image; iq[x].src='../images/' + p[x] + q[x] + '-over.gif'; } }

function on(b) { if (document.images) { if (l) off(); obj=eval("document.images."+q[b]); obj.src=iq[b].src; l=b; if(!old && b<4) popup(b); } }
function off() { if (document.images) { obj=eval("document.images."+q[l]); obj.src="../images/" + p[l] + q[l] + ".gif"; } }

function onCell(id, cl) { if(document.all) { document.all.item("menuitem_" + id).bgColor=cl; document.all.item("menuitemtext_" + id).className='menuItemBox'; } }
function offCell(id) { if(document.all) { document.all.item("menuitem_" + id).bgColor='#f7f7f7'; document.all.item("menuitemtext_" + id).className='menuItem'; } }

function killPopup(id) { if(document.all) { document.all[id].style.visibility='hidden'; } }

function open_win(url, name, w, h){ window.open (url, name, "width="+w+", height="+h+", left="+(((screen.availWidth-w)/2)-5)+", top="+(((screen.availHeight-h)/2)-1)); }

function setActiveCSS(title) {
	var i, a, main;
	for(i=0;(a = document.getElementsByTagName("link")[i]); i++) {
		if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
			a.disabled = true;
			if (a.getAttribute("title") == title)
				a.disabled = false;
		}
	}
}

function switch_container(idContainer) {
	if (document.all) {
		if (document.all[idContainer].style.display=='') {
			document.images[idContainer+'_switcher'].src='../images/sico/portletbar_expand.gif';
			document.all[idContainer].style.display='none';
		} else {
			document.images[idContainer+'_switcher'].src='../images/sico/portletbar_collapse.gif';
			document.all[idContainer].style.display='';
		}
	}
}

// Select/Deselect all
function click_all(f, fld, state) { 
	var i=0;
	
	for (r in f.elements)
	  if (r==fld)
		if (f.elements[r].length) 
			f.elements[r][i++].checked=state; 
		else
			f.elements[r].checked=state; 
}

// Browser check
function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 

// BEGIN Menu PopUp
var old=true, nav=false, nav6=false, iex=false, activeMenu, activeMenuLastPosition, tmpMenu;

if (document.all)
	iex=true;
else {
	if (document.layers) nav=true;
	if (document.getElementById) nav6=true;
}
old=!(nav||nav6||iex);

function popup(menuN){
 //startup();
 var windowWidth, windowHeight;
 if (activeMenu) kill();
 if(nav)document.captureEvents(Event.MOUSEMOVE);
 document.onmousemove=get_mouse;
 if(nav) activeMenu=eval("document."+q[menuN].substr(4));
 if(iex) activeMenu=eval(q[menuN].substr(4)+".style");
 if(nav6) activeMenu=eval("document.getElementById('"+q[menuN].substr(4)+"').style");
 windowWidth = (nav6)? window.innerWidth-16 : document.body.offsetWidth-20;
 windowHeight = (iex)? window.innerHeight : document.body.offsetHeight;
 activeMenuLastPosition=parseInt(activeMenu.left);
 if (windowWidth>725)
	 activeMenu.left=(windowWidth/2)-390+activeMenuLastPosition;
 else
	 activeMenu.left=activeMenuLastPosition-27;
 activeMenu.visibility="visible";
}

function get_mouse(e) {
var x=(nav)?e.pageX:event.x+document.body.scrollLeft;
var y=(nav)?e.pageY:event.y+document.body.scrollTop;
if (x>=(activeMenu.pixelLeft+activeMenu.pixelWidth)) kill();
if (y>=activeMenu.pixelHeight+activeMenu.pixelTop+5) kill();
if (y<=activeMenu.pixelTop-19) kill();
}

function kill(){
 activeMenu.visibility="hidden"; document.onmousemove='';
 activeMenu.left=activeMenuLastPosition;
}

// END Menu PopUp


// BEGIN General business functions
function validateNumber(str) {
	for (i=0;i<str.length;i++)
		if (str.charAt(i) != ".")
			if (isNaN(parseInt(str.charAt(i))))
				return (false);
	return (true);
}

/*function validateCantidad(str) {
	if (validateNumber(str)) {
		var reg = new RegExp("(^-?\d\d*\.\d{4}$)|(^-?\d\d{4}$)|(^-?\.\d\d{4}$)/");
		if (reg.test(str))
			return (true);
		else
			return (false);
	} else
		return (false);


}*/
// END General business functions


// BEGIN Original Scrollable Area code developed by Thomas Brattli
 
var speed=50;
var loop, timer;
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 

var initialised; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') 
    objScroller=new ConstructObject('divContent','divContainer') 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true; 
} 
// END Original Scrollable Area code developed by Thomas Brattli

//-->