var mensaje="Doodigital, productos y servicios digitales, S.L. 2010-2011\n \nTodos los Derechos Reservados";

function clickIE(){
// if (event.button==2){
//	alert(mensaje);
//	return false;
//	}
}

function clickNS(e){
if(document.layers||(document.getElementById&&!document.all)){
	if (e.which==2||e.which==3){
		alert (mensaje);
		return false;
		}
	}
}
if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS;
	}
else{
	document.onmouseup=clickNS;
	document.onmousedown=clickIE;
	//document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false");

texto='<img src=<? print ($rutaprincipal); ?>img/seccion/bannerdinweb.gif border=0>'

iens6=document.all||document.getElementById
ns4=document.layers

var thename
var theobj
var thetext
var winHeight
var winPositionFromTop
var winWidth
var startH=2
var openTimer

function setObj(text,theswitch,inwidth,inheight) {
	thetext=text
	if(iens6){
		thename = "viewer"
		theobj=document.getElementById? document.getElementById(thename):document.all.thename
		winHeight=100
			if(iens6&&document.all) {
				winPositionFromTop=document.body.clientHeight
				winWidth=694
			}
			if(iens6&&!document.all) {
				winPositionFromTop=window.innerHeight
				winWidth=(window.innerWidth-(document.body.offsetLeft+30))
			}
			if(theswitch=="override") {
				winWidth=inwidth
				winHeight=inheight
			}
		theobj.style.width=winWidth
		theobj.style.height=startH
			if(iens6&&document.all) {
				theobj.style.top=document.body.scrollTop+winPositionFromTop
				theobj.innerHTML = ""
				theobj.insertAdjacentHTML("BeforeEnd","<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
			}
			if(iens6&&!document.all) {
				theobj.style.top=window.pageYOffset+winPositionFromTop
				theobj.innerHTML = ""
				theobj.innerHTML="<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>"
			}
	}
	if(ns4){
		thename = "nsviewer"
		theobj = eval("document."+thename)
		winPositionFromTop=window.innerHeight
		winWidth=window.innerWidth
		winHeight=100
			if(theswitch=="override") {
				winWidth=inwidth
				winHeight=inheight
			}
		theobj.moveTo(0,eval(window.pageYOffset+winPositionFromTop))
		theobj.width=winWidth
		theobj.clip.width=winWidth
		theobj.document.write("<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
		theobj.document.close()
	}
	viewIt()
}

function viewIt() {
	if(startH<=winHeight) {
		if(iens6) {
			theobj.style.visibility="visible"
				if(iens6&&document.all) {
					theobj.style.top=10
				}
				if(iens6&&!document.all) {
					theobj.style.top=10
				}
			theobj.style.height=startH
			startH+=2
			openTimer=setTimeout("viewIt()",10)
		}
		if(ns4) {
			theobj.visibility = "visible"
			theobj.moveTo(0,(eval(window.pageYOffset+winPositionFromTop)-startH))
			theobj.height=startH
			theobj.clip.height=(startH)
			startH+=2
			openTimer=setTimeout("viewIt()",10)
		}
	}else{
		clearTimeout(openTimer)
	}
}

function stopIt() {
	if(iens6) {
		theobj.innerHTML = ""
		theobj.style.visibility="hidden"
		startH=2
	}
	if(ns4) {
		theobj.document.write("")
		theobj.document.close()
		theobj.visibility="hidden"
		theobj.width=0
		theobj.height=0
		theobj.clip.width=0
		theobj.clip.height=0
		startH=2
	}
}


odWin = null;
ventana = null;
function popUp(url) {
   var alt= (screen.height - 400)/2;  
   var anc= (screen.width  - 450)/2;
   odWin=window.open(url,"win",'toolbar=0,location=no,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=550,height=380,left='+ anc +',top=' + alt);
}	

function popUpImagen(url) {
   var alt= (screen.height - 550)/2;  
   var anc= (screen.width  - 750)/2;
   odWin=window.open(url,"win",'toolbar=0,status=no,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=700,height=550,left='+ anc +',top=' + alt);
}	


if (iens6){
	var valor=screen.width-232
	document.write("<div id='viewer' style='background-color:#FFFFCC;visibility:hidden;position:absolute;left:"+valor+";width:0;height:0;z-index:1;overflow:hidden;border:1px ridge white'></div>")
}
if (ns4){
	hideobj = eval("document.nsviewer")
	hideobj.visibility="hidden"
}




