// Insgesamt gespendet
var kontoAll = 10;

// Costs per Click in Cents
var cpc = 0.17;

// Klicks und Anzeigen insgesamt
var klicksAll = 266;
var anzeigenAll =  37708;

// Stand
datum= "12.3.2004"

var stats = " \
<table class=\"adstat\" style=\"font-size:8px;border:1px black solid;\"> \
<tr>";

stats = stats + "<th>Kontostand<\/th> <td>";
stats = stats + "" + round2((kontoAll - (cpc * klicksAll))) + " E";
stats = stats + "<\/td> <\/tr>";

stats = stats + "<th>Gespendet<br/>insgesamt<\/th> <td>";
stats = stats + "" + kontoAll + " E";
stats = stats + "<\/td> <\/tr>";

stats = stats + "<th>Klicks insgesamt<\/th> <td>";
stats = stats + klicksAll;
stats = stats + "<\/td> <\/tr>";

stats = stats + "<th>Anzeigen<\/th> <td>";
stats = stats + anzeigenAll;
stats = stats + "<\/td> <\/tr>";

stats = stats + "<th>Stand<\/th> <td>";
stats = stats + datum;
stats = stats + "<\/td> <\/tr>";

stats = stats + "<th>Start<\/th> <td>";
stats = stats + "5.1.2004";
stats = stats + "<\/td> <\/tr>";

stats = stats + "<\/table>";


//
//
//
//
function posSpecification (x, y) {
	if (navigator.appName.indexOf("Microsoft")>=0) {
		return "left=" + x + ",top=" + y;
	}else{
		return "screenX=" + x + ",screenY=" + y;
	}
}


function WinAdsInfo(url, width, height) {
	width += 0;
	height += 0;
	posleft = Math.floor((screen.availWidth - width - 10) / 2);
	postop = Math.floor((screen.availHeight - height - 30) / 2);
	winStats = 'close=0,locationbar=0,statusbar=0,menubar=0,scrollbars=1,resizable,width='+width+',height='+height+',' + posSpecification(posleft,postop);
	win = window.open(url, '_blank', winStats);
	win.focus();
}

// div operator simulation
function div(op1, op2) {
  return(op1 / op2 - op1 % op2 / op2);
}

function round2(i) {
	return Math.round(i*100)/100;
}



