//***********************************************************************************************************
//                                        © 2003 by Aave, www.aave.info
//***********************************************************************************************************


// code for loading page in OWN window


if (window != top)
	top.location.href = location.href;


// end code

//***********************************************************************************************************
//***********************************************************************************************************


// popup code

function newwindowa() {
	var popurl1="scamlist.html"

	window.open(popurl1,""," width=300,height=400,scrollbars=1,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,screenX=50,screenY=50")
}

function newwindowb() {
	var popurl1="album.html"

	window.open(popurl1,""," width=500,height=550,scrollbars=0,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,screenX=50,screenY=50")
}


// end popup code

//***********************************************************************************************************
//***********************************************************************************************************

// code for scroller


var scrTimer = 20; 

function QScroll(num) {
  if (pgLoaded && wndw[num]) {
  	clearTimeout(wndw[num].scrTmId);
  	wndw[num].scrTmId = 0;
  }
}

function loadScrLayer(num,layr,id) {
	if (!pgLoaded) return; 
	if (typeof wndw[num].cnt != "undefined") wndw[num].cnt.hide();
  wndw[num].scrTmId = 0;
	wndw[num].cnt = new actObj(layr);
  if (id && document.getElementById) 
    wndw[num].cnt.width = document.getElementById(id).offsetWidth;
	wndw[num].cnt.show();
	wndw[num].cnt.moveTo(0,0);	
	wndw[num].maxX = wndw[num].cnt.width - wndw[num].width;
	wndw[num].maxY = wndw[num].cnt.height - wndw[num].height
} 

function ScrllDown(num,inc) {
	if (!pgLoaded||!wndw[num]) return;
	if (wndw[num].scrTmId) clearTimeout(wndw[num].scrTmId);
	var y = parseInt(wndw[num].cnt.css.top);
	if (y>-wndw[num].maxY) { 
    if ((y-inc)>(-wndw[num].maxY)) wndw[num].cnt.moveBy(0,-inc);
		else wndw[num].cnt.moveBy(0,-(wndw[num].maxY-Math.abs(y)));
		wndw[num].scrTmId = setTimeout("ScrllDown("+num+","+inc+")",scrTimer);	
	}
}

function ScrllUp(num,inc) {
	if (!pgLoaded||!wndw[num]) return;
	if (wndw[num].scrTmId) clearTimeout(wndw[num].scrTmId);
	var y = parseInt(wndw[num].cnt.css.top);
	if (y<0) { 
    if ((y+inc)<=0) wndw[num].cnt.moveBy(0,inc); 
		else wndw[num].cnt.moveBy(0,-y);
		wndw[num].scrTmId = setTimeout("ScrllUp("+num+","+inc+")",scrTimer);	
  }
}

function actObj(id,x,y,w,h) {
	this.el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getContentsRef(id,document): null;
	if (!this.el) return null;
	this.doc = (document.layers)? this.el.document: this.el;
	this.css = (this.el.style)? this.el.style: this.el;
	var px = (document.layers||window.opera)? "": "px";
	this.x = x || 0;	if (x) this.css.left = this.x+px;
	this.y = y || 0;	if (y) this.css.top = this.y+px;
	this.width = w? w: (this.el.offsetWidth)? this.el.offsetWidth: (this.css.clip.width)? this.css.clip.width: 0;
	this.height = h? h: (this.el.offsetHeight)? this.el.offsetHeight: (this.css.clip.height)? this.css.clip.height: 0;
	if (w){ (document.layers)? this.css.clip.width=w+px: this.css.width=w+px;}
	if (h){ (document.layers)? this.css.clip.height=h+px: this.css.height=h+px;}
	this.obj = id + "actObj"; 	eval(this.obj + "=this");
}

function show() { if (this.css) this.css.visibility = "visible"; }
function hide() { if (this.css) this.css.visibility = "hidden"; }

function moveTo(x,y) {
	if (x!=null) this.x=x; if (y!=null) this.y=y;
	if (this.css) {
		if (this.css.moveTo) {
			this.css.moveTo(Math.round(this.x),Math.round(this.y));
		}
	else {
		this.css.left=Math.round(this.x)+"px";
		this.css.top=Math.round(this.y)+"px";
		}
	}
}

function moveBy(x,y) {
	this.moveTo(this.x+x,this.y+y);
}

function writeContents(cntnt) {
	if (typeof this.doc.innerHTML!="undefined") {
      this.doc.innerHTML = cntnt;
  } else if (document.layers) {
			this.doc.write(cntnt);
			this.doc.close();
  }
}

actObj.prototype.show = show;
actObj.prototype.hide = hide;
actObj.prototype.moveTo = moveTo;
actObj.prototype.moveBy = moveBy;
actObj.prototype.writeContents = writeContents;


function getContentsRef(layr,doc) {
	if (document.layers) {
		var theContents;
		for (var i=0; i<doc.layers.length; i++) {
	  	thelayr = doc.layers[i];
			if (theContents.name == layr) return theContents;
			else if (theContents.document.layers.length > 0) 
	    	if ((theContents = getContentsRef(layr,theContents.document)) != null)
					return theContents;
	  }
		return null;
  }
}


var pgLoaded = false;
var wndw = new Array();	
function initScrLayer() {
	pgLoaded=true;	
	wndw[0] = new actObj('scrllBox');	
	loadScrLayer(0,'Contents');	


	if (navigator.userAgent.indexOf("Gecko")>-1) {
    for (var i=0; i<wndw.length; i++) {
			if (wndw[i].el.parentNode.id.indexOf("ContentsBox")!=-1) {
				var holderId = wndw[i].el.parentNode.id;
				wndw[i].holder = document.getElementById(holderId);
				var scrWn = wndw[i].holder.removeChild(wndw[i].el);
				document.body.appendChild(wndw[i].el);
				wndw[i].css.zIndex = 1000;
				var y = wndw[i].holder.offsetTop;
				var x = wndw[i].holder.offsetLeft;
				wndw[i].moveTo(x,y);
			}
  	}
  }
}


function rePosGecko() {
  for (var i=0; i<wndw.length; i++) {
    var y = wndw[i].holder.offsetTop;
		var x = wndw[i].holder.offsetLeft;
		wndw[i].moveTo(x,y);
  }
}

window.onload = initScrLayer;
if (navigator.userAgent.indexOf("Gecko")>-1) window.onresize = rePosGecko;

// end scroller code


//***********************************************************************************************************
//***********************************************************************************************************