/*
  programmer: Jeroen Tabeling / JeTab ICT 
  date      : march 2009
  usage for : WWW.DOPEWARCRIMINALS.COM
*/

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 = "messagespopup"
        theobj=document.getElementById? document.getElementById(thename):document.all.thename		
            winHeight=100
            if(iens6&&document.all) {
                winPositionFromTop=document.body.clientHeight
                winWidth=(document.body.clientWidth-document.body.leftMargin)
			}
            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";
			theobj.visibility="visible";
			/*InternetExplorer*/
			if(iens6&&document.all) {
                theobj.style.top=(document.body.scrollTop+winPositionFromTop)-startH;
				theobj.style.left=(document.documentElement.clientWidth-winWidth-10);
                theobj.style.height=startH				
			}
            /*FireFox*/
			if(iens6&&!document.all) {
				theobj.style.width=winWidth+'px';
				theobj.style.top=(window.pageYOffset+winPositionFromTop)-startH+'px';
				theobj.style.left=(window.innerWidth-winWidth-20)+'px';
				theobj.style.height=startH+'px';				
			}			
            startH+=2
            openTimer=setTimeout("viewIt()",5)
		}
        
		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()",5)
		}
		
    }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}}


// verander hieronderde achtergrondkleur ( CCFFCC ) en de positie van de te verschijnen link beschrijving
if (iens6){
//document.write("<div id='viewer' style='background:url(popupbg.png);visibility:hidden;z-index=-1;float:left;left:0;width:0;height:0;z-index:1;overflow:hidden;border:0px'></div>")}

//document.write("<div id='viewer' style='background:url(popupbg.png);visibility:hidden;z-index=-1;float:left;left:0;width:0;height:0;z-index:1;overflow:hidden;border:0px'></div>")

}

if (ns4){
hideobj = eval("document.nsviewer")
hideobj.visibility="hidden"}

