isId = Boolean(document.getElementById && document.createElement);
isAll = Boolean(document.all);
isLayers = Boolean(document.layers);
ie5 = Boolean(isId && (navigator.userAgent.indexOf('MSIE') != -1));
ie4 = Boolean(isAll && (navigator.userAgent.indexOf('MSIE') != -1) && !isId);
ie = Boolean(ie4 || ie5);
op = Boolean((navigator.userAgent.indexOf('Opera') != -1) && (parseInt(navigator.appVersion) >= 5));
ns4 = Boolean(isLayers);
ns5 = Boolean(isId && !ie && !op);
ns = Boolean(ns4 || ns5);
if(!(ns||ie||op))document.location.replace('/home/nosuportedbrowser.htm');
if(ns4){visible="show";hidden="hide"
}
else{visible="visible";hidden="hidden"
}
lowResolution=(screen.width<800);
midResolution=(screen.width==800);
hiResolution=(screen.width>800);
lowDepth=(screen.colorDepth==8);
dynLayerArray=[];
function dynLayer(obj,parent){
	if(ie){
		this.css=obj.style;
		this.doc=obj;
		this.parent=obj.parentElement.id?eval('dyn'+obj.parentElement.id):false
	}
	else if(ns4){
		obj.created=true;
		this.css=obj;
		this.doc=obj.document;
		this.parent=parent?eval('dyn'+parent.id):false
	}
	else{
		obj.created=true;
		this.css=obj.style;
		this.doc=obj;
		this.parent=parent?eval('dyn'+parent.id):false
	}
	this.drag=false;
	this.bgColor=null;
	this.bgImage=null;
	dynLayerArray[j]=this;j++
}
dynLayer.prototype.setWidth=function(w){
	w=w<0?0:w;
	if(ns4)this.css.clip.width=w;
	else if(ns5)this.css.width=w;
	else this.css.pixelWidth=w
};
dynLayer.prototype.setHeight=function(h){
	h=h<0?0:h;
	if(ns4)this.css.clip.height=h;
	else if(ns5)this.css.height=h;
	else this.css.pixelHeight=h
};
dynLayer.prototype.getWidth=function(){
	if(ns4)return this.css.clip.width;
	else if(op||ie4)return this.css.pixelWidth;
	else return this.doc.offsetWidth
};
dynLayer.prototype.getHeight=function(){
	if(ns4)return this.css.clip.height;
	else if(op||ie4)return this.css.pixelHeight;
	else return this.doc.offsetHeight
};
dynLayer.prototype.getContentWidth=function(){
	if(ns4)return this.doc.width;
	else if(ns5)return this.doc.offsetWidtht;
	else return this.doc.scrollWidth
};
dynLayer.prototype.getContentHeight=function(){
	if(ns4)return this.doc.height;
	else if(ns5)return this.doc.offsetHeight;
	else return this.doc.scrollHeight
};
dynLayer.prototype.setSize=function(w,h){
		this.setWidth(w);
		this.setHeight(h)
};
dynLayer.prototype.setLeft=function(x){
	if(ns)this.css.left=x;
	else this.css.pixelLeft=x
};
dynLayer.prototype.setTop=function(y){
	if(ns)this.css.top=y;
	else this.css.pixelTop=y
};
dynLayer.prototype.getLeft=function(){
	if(ns4)return this.css.left;
	else return this.doc.offsetLeft
};
dynLayer.prototype.getTop=function(){
	if(ns4)return this.css.top;
	else return this.doc.offsetTop
};
dynLayer.prototype.moveTo=function(x,y){
	this.setLeft(x);
	this.setTop(y)
};
dynLayer.prototype.moveBy=function(dx,dy){
	this.setLeft(this.getLeft()+dx);
	this.setTop(this.getTop()+dy)
};
dynLayer.prototype.show=function(){
	this.css.visibility=visible
};
dynLayer.prototype.hide=function(){
	this.css.visibility=hidden
};
dynLayer.prototype.setLayer=function(t,r,b,l){
	if(ns4){
		this.css.clip.top=t;
		this.css.clip.right=r;
		this.css.clip.bottom=b;
		this.css.clip.left=l;
		this.setSize(r-l,b-t)
	}
	else{
		if(op){
			this.setSize(r-l,b-t);
			this.moveTo(l,t)
		};
		this.css.clip='rect('+t+'px '+r+'px '+b+'px '+l+'px)'
	}
};
dynLayer.prototype.resetLayer=function(){
	this.setLayer(0,0,0,0)
};
dynLayer.prototype.setHTML=function(html){
	if(ns4){
		this.doc.write(html);
		this.doc.close()
	}else this.doc.innerHTML=html
};
dynLayer.prototype.getbgColor=function(){
	return this.bgColor
};
dynLayer.prototype.getbgImage=function(){
	return this.bgImage
};
dynLayer.prototype.setbgColor=function(color){
	if(color==null&&!ns4)color='transparent';
	this.bgColor=color;
	if(ns4)this.doc.bgColor=color;
	else this.css.backgroundColor=color
};
dynLayer.prototype.setbgImage=function(path){
	this.bgImage=path;
	if(ns4){
		this.css.background.src=path;
		if(!path)this.setbgColor(this.getbgColor())
	}else this.css.backgroundImage='url('+path+')'
};
function getParentVisibility(obj){
	if(obj.parent){parentVisibility=obj.parent.css.visibility!=hidden;getParentVisibility(obj.parent)
	}else parentVisibility=true
};
dynLayer.prototype.getVisibility=function(){
	visibility=this.css.visibility!=hidden;
	getParentVisibility(this);
	return visibility&&parentVisibility
};
function swapImg(dynLayer,imgName,imgSrc){
	if(ns4)eval((dynLayer?dynLayer+'.doc':'document')+'[\''+imgName+'\'].src='+imgSrc+'.src');
	else document[imgName].src=eval(imgSrc+'.src')
}
function getFormObj(dynLayer,formName,formField){
	if(ns4)return eval((dynLayer?dynLayer+'.doc.':'document.')+formName+(formField?('.'+formField):''));
	else return eval('document.'+formName+(formField?'.'+formField:''))
}
function getAvailableWidth(){
	if(ns||op)return window.innerWidth;
	else return document.body.clientWidth
}
function getAvailableHeight(){
	if(ns||op)return window.innerHeight;
	else return document.body.clientHeight
}
function getDocumentWidth(){
	if(ns)return document.width;
	else return document.body.scrollWidth
}
function getDocumentHeight(){
	if(ns)return document.height;
	else return document.body.scrollHeight
}
function setupInitialValues(){
	if ((document.location.pathname=='/home/default.php')||(document.location.pathname=='/home/')){
	loginflag=true;
	dynloginLayer.show();
	}
	document.onmousemove=mouseMove
	if(ns)document.captureEvents(Event.MOUSEMOVE)}

function initializeLayers(){
	j=0;
	if(ie4){
		for(var i=0;i<document.all.tags('div').length;i++){
			obj=document.all.tags('div')[i];if(obj.id!='')eval('dyn'+obj.id+'=new dynLayer(obj)')
		}
	}
	if(ie5){
		for(var i=0;i<document.getElementsByTagName('div').length;i++){
			obj=document.getElementsByTagName('div')[i];if(obj.id!='')eval('dyn'+obj.id+'=new dynLayer(obj)')
		}
	}
	if(ns4){
		document.captureEvents(Event.MOUSEMOVE);
		for(var i=0;i<document.layers.length;i++)extractNS4Layers(document.layers[i])
	}
	if(ns5){
		for(var i=0;i<document.getElementsByTagName('div').length;i++){
			extractNS5Layers(document.getElementsByTagName('div')[i])
		}
	}setupInitialValues()
}
function extractNS4Layers(obj,parent){if(obj.name!=''){
	if(!obj.created)eval('dyn'+obj.name+'=new dynLayer(obj,parent)');
		for(var i=0;i<obj.document.layers.length;i++){
			extractNS4Layers(obj.document.layers[i],obj)
		}
	}
}
function extractNS5Layers(obj,parent){
	if(obj.id!=''){
		if(!obj.created)eval('dyn'+obj.id+'=new dynLayer(obj,parent)');
		for(var i=0;i<obj.getElementsByTagName('div').length;i++){
			extractNS5Layers(obj.getElementsByTagName('div')[i],obj)
		}
	}
}
function unselectElement(){
	return false
}
function preLoad(){
	imagePath=imageFiles[0];
	for(var i=1;i<imageFiles.length;i++){
		imageFile=imageFiles[i];
		imageName=imageFile.substring(0,imageFile.indexOf('.'));
		eval(imageName+'=new Image();'+imageName+'.src="'+imagePath+imageFile+'"')
	}
}
if(ns){
origWidth=innerWidth;origHeight=innerHeight
}
function reloadPage(){
	if(ns4&&origWidth==innerWidth&&origHeight==innerHeight)return;
	if(ie||ns5)setTimeout('window.location.reload()',1000);
	else window.location.reload()
}
function noFocus(obj){
	if(!ns5){if(obj.blur())obj.blur()
	}
}
function msgStatus(msg){
	status=msg;return true
}
propertiesNames=new Array('toolbar','location','directories','status','menubar','scrollbars','resizable','top','left','width','height');
function abrejanela(){
	var arg=abrejanela.arguments;
	var properties;
	var url=arg[0];
	if(ie){
		popWidth=screen.availWidth;popHeight=screen.availHeight
	};
	if(ns){
		popWidth=screen.availWidth-(window.outerWidth-window.innerWidth);
		popHeight=screen.availHeight-(window.outerHeight-window.innerHeight)
	};
	switch(arg[1]){
		case '1':properties='1,1,1,1,1,1,1,0,0,550,'+(ns?'250':'400');
		break;
		case '2':properties='1,0,0,1,0,1,1,0,0,'+(popWidth-(ns?0:10))+','+(popHeight-(ns?-55:95));
		break;
		case '3':properties='1,1,1,1,1,1,1,0,0,'+popWidth+','+popHeight;
		break;
		case '4':properties='1,1,1,1,1,1,1,20,20,550,'+(ns?'250':'400');
		break;
		case '5':properties='0,0,0,0,0,0,1,0,0,350,320';
		break;
		case '6':properties='0,0,0,1,0,0,1,0,0,'+(popWidth-(ns?0:10))+','+(popHeight-(ns?-25:65));
		break;
		case '7':properties='1,1,1,1,1,1,1,0,0,640,510';
		break;
		case '8':properties='0,0,0,0,0,0,0,150,100,240,120';
		break;
		case '9':properties='0,0,0,0,0,0,0,0,0,640,480';
		break;
		default:properties='0,0,0,0,0,0,0,0,0,550,400';
		break;
	};
	var propertiesValues=properties.split(',');
	var winproperties='';
	for(var i=0;i<11;i++){
		winproperties+=propertiesNames[i]+'='+propertiesValues[i]+(i<10?',':'')
	};
	newWindow=window.open(url,arg[2],winproperties);
}
function onerror(){
	document.location.href="javascript:"
}