// JavaScript Document
<!--

var ie=document.all
var ns6=document.getElementById&&!document.all

// FADEIN AND OUT
function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

function fadeInCvr(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 20;
      setTimeout("fadeInCvr('"+objId+"',"+opacity+")", 100);
    }
  }
}

function fadeOutCvr(objId, opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity < 10) {
	obj.style.visibility = 'hidden';
    } else if (opacity > 10) {
	  setOpacity(obj, opacity);
      opacity -= 33;
      setTimeout("fadeOutCvr('"+objId+"',"+opacity+")", 100);
	  }
  }
}

function loadCvr(imageId) {
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeInCvr(imageId,0);
}


function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}

function enlarge(which, alt, e, position, imgwidth, imgheight){
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (position=="center"){
pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
horzpos=ns6? pageXOffset+window.innerWidth/2-imgwidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-imgwidth/2
vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2
if (window.opera && window.innerHeight) //compensate for Opera toolbar
vertpos=pgyoffset+window.innerHeight/2-imgheight/2
vertpos=Math.max(pgyoffset, vertpos)
}
else{
var horzpos=0
var vertpos=0
}
crossobj.style.left=horzpos+"px"
crossobj.style.top=vertpos+"px"
crossobj.style.visibility="visible"
crossobj.style.width=imgwidth
crossobj.style.height=imgheight+20
crossobj.innerHTML='<div id="showimg_bg"><div id="dragbar" align="right"><span onclick="return embed_photo(\''+which+'\',\''+alt+'\',event,\''+imgwidth+'\',\''+imgheight+'\');"><img src="/inc/bttn/btn_embedthis.gif" alt="EMBED THIS IMAGE" width="55" height="20" /></span><span id="closetext" onClick="closepreview()"><img src="/inc/bttn/btn_close_img.gif" alt="CLOSE" width="55" height="20" /></span></div><div id="embed_code"></div><img src="'+which+'" width="'+imgwidth+'" height="'+imgheight+'" onClick="closepreview();"></div>'
loadCvr('showimg_bg')
return false
}
else //if NOT IE 4+ or NS 6+, simply display image in full browser window
return true
}

// EMBED CODE FOR PHOTOS
function embed_photo(image_href, alt, e, imgwidth, imgheight){
var tawidth=280
var taheight=150
if (ie||ns6){
embedobj=document.getElementById? document.getElementById("embed_code") : document.all.embed_code
if (embedobj.style.visibility == 'visible') {
	fadeOutCvr('embed_code', 100)
}
else {
horzpos=imgwidth/2-tawidth/2
vertpos=imgheight/2-taheight/2
embedobj.style.left=horzpos+"px"
embedobj.style.top=vertpos+"px"
embedobj.style.width=tawidth
embedobj.style.height=taheight
embedobj.innerHTML='<img src="/inc/img/embed_philiaecom.gif" alt="LINK TO PHILIAE.COM" width="120" height="15" /><br><textarea id="showembed" readonly="readonly" onclick="this.focus(); this.select();"><a href="http://www.philiae.com" alt="PHILIAE - POST INDUSTRIAL ROCK" title="PHILIAE - POST INDUSTRIAL ROCK"><img src="'+image_href+'" alt="'+alt+'" width="'+imgwidth+'" height="'+imgheight+'" border="0" /></a></textarea><br><br><img src="/inc/img/embed_myspace.gif" alt="LINK TO MYSPACE.COM/PHILIAE" width="120" height="15" /><br><textarea id="showembed" readonly="readonly" onclick="this.focus(); this.select();" style="width:'+imgwidth+'"><a href="http://www.myspace.com/philiae" alt="PHILIAE - POST INDUSTRIAL ROCK" title="PHILIAE - POST INDUSTRIAL ROCK"><img src="'+image_href+'" alt="'+alt+'" width="'+imgwidth+'" height="'+imgheight+'" border="0" /></a></textarea><br>.'
loadCvr('embed_code')
return false
}
}
else //if NOT IE 4+ or NS 6+, simply display image in full browser window
return true
}

//EMBED CODE FOR VIDEOS
function embed_video(movie_nr, e, movie_width, movie_height, movie_title){
var tawidth=280
var taheight=150
if (ie||ns6){
embedflobj=document.getElementById? document.getElementById("flash_embed") : document.all.flash_embed
if (embedflobj.style.visibility == 'visible') {
	fadeOutCvr('flash_embed', 100)
}
else {
pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
horzpos=ns6? pageXOffset+window.innerWidth/2-tawidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-tawidth/2
vertpos=ns6? pgyoffset+window.innerHeight/2-taheight/2 : pgyoffset+ietruebody().clientHeight/2-taheight/2
embedflobj.style.left=horzpos+"px"
embedflobj.style.top="300px"
embedflobj.style.width=tawidth
embedflobj.style.height=taheight
embedflobj.innerHTML='<img src="/inc/img/embed_autostart.gif" alt="PLAY ON LOAD" width="120" height="15" /><br><textarea id="showembed" readonly="readonly" onclick="this.focus(); this.select();"><center><embed src="http://www.vimeo.com/moogaloop.swf?clip_id='+movie_nr+'&autoplay=1" width="'+movie_width+'" height="'+movie_height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed><br /><a href="http://www.philiae.com/konsum/videos/'+movie_nr+'">'+movie_title+'</a></center></textarea><br><br><img src="/inc/img/embed_autostartno.gif" alt="PAUSE ON LOAD" width="120" height="15" /><br><textarea id="showembed" readonly="readonly" onclick="this.focus(); this.select();"><center><embed src="http://www.vimeo.com/moogaloop.swf?clip_id='+movie_nr+'" width="'+movie_width+'" height="'+movie_height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed><br /><a href="http://www.philiae.com/konsum/videos/'+movie_nr+'">'+movie_title+'</a></center></textarea>'
loadCvr('flash_embed')
return false
}
}
else //if NOT IE 4+ or NS 6+, simply display image in full browser window
return true
}

var hideObjectsID = 0;

function closepreview(){
hideObjectsID = setInterval('hideObjects()', 100)
fadeOutCvr('showimg_bg', 100)
fadeOutCvr('embed_code', 100)
fadeOutCvr('dragbar', 100)
// below accomodates NetScrape and most other crappy browsers
}		

function hideObjects() {
	crossobj.style.visibility="hidden"
	clearInterval(hideObjectsID);
}


function drag_drop(e){
if (ie&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx+"px"
crossobj.style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx+"px"
crossobj.style.top=tempy+e.clientY-offsety+"px"
}
return false
}

function initializedrag(e){
if (ie&&event.srcElement.id=="dragbar"||ns6&&e.target.id=="dragbar"){
offsetx=ie? event.clientX : e.clientX
offsety=ie? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

dragapproved=true
document.onmousemove=drag_drop
}
}

document.onmousedown=initializedrag
document.onmouseup=new Function("dragapproved=false")

// SHOW/HIDE DIV
function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

// SIS BOX UL FOR IE
startList = function() {
if (document.all&&document.getElementById) {
	if (document.getElementById("sis_box_nav")) {
navRoot = document.getElementById("sis_box_nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace
        (" over", "");
   }
   }
}
  }
 }
}
window.onload=startList;

//-->
