<!--

/**
 * @author mypelz
 */
/* general body onload script */
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

var count = 0;
var offset = 118;
var vtop;
var vright;
var vbottom;
var vleft;

function imgscroll(leftright) {
	if(leftright == "right") { count++ }
	else { count-- } 
	document.getElementById("test").style.left = eval(count * offset)+"px";
	vtop = 0
	vleft = (-count)*offset;
	vright = vleft+354;
	vbottom = 126;
	document.getElementById("test").style.clip = "rect("+vtop+"px,"+vright+"px,"+vbottom+"px,"+vleft+"px)";
	}

/* main js popup wrapping script
expects a call from onClick="popup(this.href); return false;"
makes this popup accessible and supplies the popup URL also for
visitors with js disabled in their browsers*/
function popup(url) {
/*    if(mywin) {
        mywin.close();
        }
        */
    mywin = window.open(url,'mywindow','width=520,height=600,left=100,top=200,scrollbars=no,resizable=yes,status=no,location=no');
    mywin.focus();
    }

/* fighting redundancy!!
using this script, the only attachement of the class "popup" to a "a" tag
will call the popup function defined above.
Important we have to make shure that the DOM is completly loaded.
so we use the window onload method to execute this function after complete loading
*/
function pimp_myhrefs() {
  if (!document.getElementsByTagName) return false;

  var lnks = document.getElementsByTagName("a");
  for (var i=0; i<lnks.length; i++) {
    if (lnks[i].getAttribute("class") == "thickbox") {
      lnks[i].onclick = function() {
        popup(this.getAttribute("href"));
        return false;
        }
      }
    }
  }

addLoadEvent(pimp_myhrefs);

//-->

