function down(){
	if(parent.frames.length<1){
		document.write('<img src="img/pix.gif" height="60"><br>');
	}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		nav_disc1 = newImage("img/disc1.gif");
		preloadFlag = true;
	}
}

function openWindow(URL,Name,Props) {
	window.open(URL,Name,Props);
}
  
text=new Array();
title=new Array();
	

text[1]="goin&#180; back to the roots<br>...yeah...";
	
text[2]="here&#180;s a little information about me.";

text[3]="some examples of some online- and offline-works that i&#180;ve done...";
	
text[4]="how about some goodies? download wallpapers, sound-loops and other stuff.";
	
text[5]="a few selected links; especially design- and music-related websites.";
	
text[6]="this is the place to contact me or sign my little guestbook...";

text[7]="here you currently are...";
	

var x = "";
var xx= 20;
var yy= 20;
var y = "";
var showit = 0;

var ns = (document.layers)? true:false
var ie4 = (document.all)? true:false
var ie5 = false;
	if (ie4){
		if (navigator.userAgent.indexOf('MSIE 5')>0){
   			ie5 = true;
		}
	} 

if ( navigator.platform.substring(0,3).toUpperCase() == "MAC" && (ie4 || ie5) ){
	mac = true;
	}
	else{
	mac = false;
}

if ( (ns) || (ie4) ){
   	if (ns) over = document.popDiv
   	if (ie4) over = popDiv.style
   		document.onmousemove = mouseMove
   	if (ns) document.captureEvents(Event.MOUSEMOVE)
}

function wtl(txt){
   	if (ns){
   		var lll = document.popDiv.document
   		lll.write(txt)
   		lll.close()
   	} 
	else{
   		if (ie4) document.all["popDiv"].innerHTML = txt
   	}
}

function show(obj){
   	if (ns) obj.visibility = "show"
   	else if (ie4) obj.visibility = "visible"
}

function hide(obj){
   	if (ns) obj.visibility = "hide"
   	else if (ie4) obj.visibility = "hidden"
	obj.style.left="-1000px"
}

function moveTo(obj,lx,ly){
   	obj.left = lx
   	obj.top = ly
}

function hideit(){
   	if (mac) {return;
	}
	if ( (ns) || (ie4) ){
   		showit = 0;
   		hide(over);
   	}
}

function rpopi(text){
   	txt = "<table width=150 cellpadding=1 cellspacing=0 border=0 bgcolor=\"#6484a3\"><tr><td width=148><table width=100% cellpadding=3 cellspacing=0 border=0 bgcolor=\"#4F677F\"><tr><td class=\"twhite\" bgcolor=\"#4F677F\">"+text+"</td></tr></table></td></tr></table>"
      	wtl(txt);
   	display_it();
}

function popi(i,xm){
	if (mac){
		return;
	}
	xx=xm;
	rpopi(text[i],title[i]);
}

function display_it(){
   	if ( (ns) || (ie4) ){
   		if (showit == 0){
   			moveTo(over,x+xx,y+yy);
   			show(over);
   			showit = 1;
   		}
   	}
}

function mouseMove(e){
   	if (ns) {x=e.pageX; y=e.pageY;}
   	if (ie4) {x=event.x; y=event.y;}
   	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
   	if (showit) {
   		moveTo(over,x+xx,y+yy);
   	}
}

var menuskin=1
var display_url=0

function showmenuie5(){
	var rightedge=document.body.clientWidth-event.clientX
	var bottomedge=document.body.clientHeight-event.clientY

	if (rightedge<ie5menu.offsetWidth){
		ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth
	}
	else{
		ie5menu.style.left=document.body.scrollLeft+event.clientX
	}

	if (bottomedge<ie5menu.offsetHeight){
		ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight
	}
	else{
		ie5menu.style.top=document.body.scrollTop+event.clientY
	}

	ie5menu.style.visibility="visible"
	return false
}

function hidemenuie5(){
	ie5menu.style.visibility="hidden"
}

function highlightie5(){
	if (event.srcElement.className=="menuitems"){
		event.srcElement.style.backgroundColor="#4F677F"
		event.srcElement.style.color="#ffffff"
	if (display_url==1)
		window.status=event.srcElement.url
	}
	else if (event.srcElement.className=="menuitems2"){
		event.srcElement.style.backgroundColor="#a68a4a"
		event.srcElement.style.color="#ffffff"
	if (display_url==1)
		window.status=event.srcElement.url
	}
}

function lowlightie5(){
	if (event.srcElement.className=="menuitems"){
		event.srcElement.style.backgroundColor=""
		event.srcElement.style.color="#000000"
		window.status=''
	}
	else if (event.srcElement.className=="menuitems2"){
		event.srcElement.style.backgroundColor=""
		event.srcElement.style.color="#ffffff"
		window.status=''
	}
}

function jumptoie5(){
	if (event.srcElement.className=="menuitems"){
	if (event.srcElement.getAttribute("target")!=null)
		window.open(event.srcElement.url,event.srcElement.getAttribute("target"))
	else
		window.location=event.srcElement.url
	}
}




var offsetxpoint=-2 //Customize x offset of tooltip
var offsetypoint=18 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["popDiv"] : document.getElementById? document.getElementById("popDiv") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ppopi(thetext){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML="<table width=150 cellpadding=1 cellspacing=0 border=0 bgcolor=\"#6484a3\"><tr><td width=148><table width=100% cellpadding=3 cellspacing=0 border=0 bgcolor=\"#4F677F\"><tr><td class=\"twhite\" bgcolor=\"#4F677F\">"+text[thetext]+"</td></tr></table></td></tr></table>"
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

function pppopi(arrNum){
	if(ns6||ie){
		ppopi(arrNum);
		document.onmousemove=positiontip
	}
	else{
		popi(arrNum,0);
	}
}

function hhideit(){
	if(ns6||ie){
		hideddrivetip();
	}
	else{
		hideit();
	}
}

if(ns6||ie){
	hideddrivetip();
}
else{
	hideit();
}
