// Frame-Umleitung
//if ( (top.frames.length == 0) && (document.URL.indexOf('file:/') == -1) ) {
if (top.frames.length == 0) {
  top.location.href = "jsframe.html?" + escape(document.URL) + '?&frame=' + escape(top.document.referrer);
}

function highlightCurrentPageLink(i) {
  var frameElements = parent.frames[2].document;
  var tag_a = frameElements.getElementsByTagName('td');
  for (var j=1; j <= tag_a.length - 1; j++) {
    element = tag_a[j];
    element.style.backgroundColor = '#E2E2E2';
    element.style.border = '1px solid #E2E2E2';
    tag_a[j].className = 'meinecssklasseinaktiv';
  }
  tag_a[i].style.backgroundColor = '#FFFFFF';
  tag_a[i].style.border = '1px solid #C0C0C0';
  tag_a[i].className = 'meinecssklasseaktiv';

}

function showImage(img, description, x, y) {

 x = x + 22;
 y = y + 100;

 w = self.open("","Screenshot","resizable=yes,screenX=0,screenY=0,width=" + x + ",height=" + y);
 var filename = img.src;
 filename = filename.replace(/k_/,"_");
 with (w.document) {
   open();
   write('<html><head><meta http-equiv="Pragma" content="no-cache"><title>Screenshot</title></head>');
   write('<body bgcolor="#F0F0F0" ondragstart="return false" onselectstart="return false"; return true"><div align="center"><img src="' + filename + '" name="image_big"><p>');
   write('<font face="Verdana,Arial,Helvetica" size="2" color="#000000"><b>' + description + '</b></font><form>');
   write('<input type="image" src="img/popup_close.gif" name="closeBtn" onClick="self.close()">');
   write('</form></div></body></html>');
   close();
 }
 w.focus();
}

// extended javascript-api-methods		:
// * jsApi-extension-name / file-name	: "jsApi.NumberString.flexibleConverting.js"
// * original download-location		: "http://www.pseliger.de/jsExtendedApi/jsApi.NumberString.flexibleConverting.js"
Number.prototype.fixedDigits = function(){var content=this;if(isNaN(content)){return content;}var separator="comma";var digits=-1;var comma="";var block="";for(var i=0;i<arguments.length;i++){if(arguments[i].constructor==Number){digits=Math.round(arguments[i]);}else if(arguments[i].constructor==String){if(separator=="comma"){comma=arguments[i];}else if(separator=="block"){block=arguments[i];}separator=((separator=="block")?("comma"):((separator=="comma")?("block"):("comma")));}}if(digits<0){digits=((content.toString().indexOf(".")>=0)?((content.toString().split("."))[1].length):(0));}if(comma===""){comma=".";}content=(Math.round(content*Math.pow(10,digits))/Math.pow(10,digits)).toString();if(digits>=1){content=content.split(".");}else{content=new Array(content);comma="";}content[content.length]="";var blockCounter=0;for(var i=content[0].length-1;i>=0;i--){content[content.length-1]=content[0].charAt(i)+content[content.length-1];blockCounter++;if(blockCounter==3){blockCounter=0;content[content.length-1]=block+content[content.length-1];}}content[0]=content[content.length-1];content.length=content.length-1;if(content.length==1){content[1]="";}for(var i=content[1].length;i<digits;i++){content[1]+="0";}content=new String(content[0]+comma+content[1]);if(content.charAt(0)==" "){content=content.substring(1);}return content;};

function listpreis() {
  liz=parseInt(document.OnlineReg_Form.Lizenzen.value);
  var pr =20.00;

  if (!liz) {liz=1;}
  if (liz == 0) {liz=1;}

  if ((liz >= 3) && (liz <=4)) {
    pr = 19.00; }

  if ((liz >= 5) && (liz <=7)) {
    pr = 17.00; }

  if ((liz >= 8) && (liz <=10)) {
    pr = 15.00; }

  if ((liz >= 11) && (liz <=15)) {
    pr = 13.00; }

  if (liz >= 16) {
    pr = 10.00; }

  berechnung =  liz * pr;
  if (liz >= 25) {
    berechnung = 250.00;
    pr = berechnung / liz;
  }
  document.OnlineReg_Form.Preis.value= berechnung.fixedDigits(2) + " EUR";
  document.OnlineReg_Form.PreisProLizenz.value= pr.fixedDigits(2) + " EUR";
}

function listpreispaypal() {
  liz=parseInt(document.OnlineReg_Form.Lizenzen.value);
  var pr =21.00;

  if (!liz) {liz=1;}
  if (liz == 0) {liz=1;}

  if ((liz >= 3) && (liz <=4)) {
    pr = 20.00; }

  if ((liz >= 5) && (liz <=7)) {
    pr = 18.00; }

  if ((liz >= 8) && (liz <=10)) {
    pr = 16.00; }

  if ((liz >= 11) && (liz <=15)) {
    pr = 14.00; }

  if (liz >= 16) {
    pr = 11.00; }

  berechnung =  liz * pr;
  if (liz >= 24) {
    berechnung = 250.00;
    pr = berechnung / liz;
  }
  document.OnlineReg_Form.Preis.value= berechnung.fixedDigits(2) + " EUR";
  document.OnlineReg_Form.PreisProLizenz.value= pr.fixedDigits(2) + " EUR";
}
function openwin(lfile, x, y) {
  open(lfile,"Rabattstaffel","resizable=yes,screenX=0,screenY=0,width=" + x + ",height=" + y);
}


/* -----------------------------------------------
   POWER PHLOGGER - v.2.2.2a
   (c) 2000-2002 www.phpee.com
   contact: webmaster@phpee.com
  ------------------------------------------------ */

// ----------------------------------------------------------
// SETTINGS:
// here should be your username you received from www.superscripte.de
// Do not edit this file manually!! Use the one you got in your
// confirmation-email or the one from PowerPhlogger's settings
// section.
   id = "oebackup";
// If you're using a frameset and are not getting correct 
// referrers, please uncomment the following line:
    pp_frames = true;
// ----------------------------------------------------------


// define some defaults -------------------------------------
//if(showme==null) var showme='n';
//if(st==null)     var st='js';    // st means show-type :)
var showme='n';
var st='js';    // st means show-type :)

// get the user agent name ----------------------------------
v = navigator.appName;

// get the screen resolution --------------------------------
c=0;
if (v != "Netscape") c = screen.colorDepth;
else c = screen.pixelDepth;

// get the screen size --------------------------------------
s = screen.width+"x"+screen.height;

// get the document's title ---------------------------------
t = escape(document.title);

// get the document's referrer -------------------------------
var f = "";

// if pp_frames is true then try getting the framed referral (without error checking)
if (typeof(pp_frames) != "undefined")
	if (pp_frames)
		f = top.document.referrer;

// get the referral for non-multi-domained-framed sites using a Netscape browser
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
	if (document["parent"] != null) 
		if (parent["document"] != null) // ACCESS ERROR HERE!
			if (parent.document["referrer"] != null) 
				if (typeof(parent.document) == "object")
					f = parent.document.referrer; 

// get the referral for the current document if a framed referral wasn't found
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
	if (document["referrer"] != null) 
		f = document.referrer;

// convert all the unknown's into blank
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
	f = "";

// escape the referral
f = escape(f);

// getting data ready to send -------------------------------
r="?id="+id+"&referer="+f+"&r="+s+"&c="+c+"&showme="+showme+"&st="+st+"&title="+t;

// adding logid if called by st='phpjs'
if(jslogid==null) var jslogid = 0;
else r = r + "&jslogid="+jslogid;


if (st=='js') { // calling PowerPhlogger by JavaScript-tag
	if (v != "Microsoft Internet Explorer") {
		r = r+"&url="+document.URL; // $HTTP_REFERER problem with NS,...
	}
	document.open();
	document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\"http://www.oebackup.de/pphlogger/pphlogger.php"+r+"\"></script>");
	document.close();
} else { // calling PowerPhlogger by IMG-tag
	rand = Math.round(1000*Math.random());
	r = r+"&b="+rand;  //force the page to load the IMG
	document.open();
	document.write("<img src=\"http://www.oebackup.de/pphlogger/pphlogger.php"+r+"\" alt=\"\" border=\"0\">");
	document.close();
}
