<!-- NoAd -->
var writeWin = null;

function ShowAddress(part1, part2)
{
var addr = (part1 + "@" + part2);
var result = ("<a href='" + "mail" + "to:" + addr + "'>" + addr + "</a>");
return result;
}

function email() {


var writeWin = null;
writeWin =window.open('','aWin','top=0,left=0,width=290,height=190'); 
var ePen ='<html><head><title>Napiště nám - Send us Email </title></head>'; 
ePen += '<body text="#000000" bgcolor="#ffffff" background="images/sedy_mramor.jpg"><p><CENTER><B>Napiště nám - Send us E-Mail</CENTER></p> <CENTER> Email :'; 
ePen += ShowAddress("INFO", "PISTELAK.CZ")
ePen += '</CENTER>&nbsp; <center><img alt="Pistelak applications" src="images/pi_logo.gif"></center> ';
ePen += '</p></body></html>';
var wd = writeWin.document;
wd.open();
wd.write(ePen);
wd.close();
}



function getCookie(theName){
	var theValue = document.cookie;
	if (theValue.indexOf(theName) == -1) return 0;
	theValue = theValue.substring(theValue.indexOf(theName));
	theValue = theValue.substring(0,theValue.indexOf(";"));
	return theValue.substring(theValue.indexOf("=")+1);
}


function Point (aX,aY){
	this.x = aX;
	this.y = aY;
}

function blinkme(){
	if (!blink) {
		chart.DrawText("",100,100,255,102,0);		// nudge the java applet
		chart.DrawText("Loading",20,75,255,102,0);
		blink = 1;
	} else {
		chart.DrawText("",100,100,255,102,0);		// nudge the java applet
		chart.DrawRect(10,60,50,30,0,0,0);	// erase the text
		blink = 0;
	}
}

// pround - precision round function (written by Bob Hartlaub)
// returns the rounded number
//	
//	num - the number to round
//	precision - how many decimal places to round to

function pround(num, precision){
	num = parseFloat(num);					// turn num into a number
	rndprec = Math.pow(10,(precision));
	num = ((Math.round(num * rndprec)) / rndprec);		// round to precision amount

	//Fix code to avert javascript 1.2 internal precision problem
	p_dot   = /\./;						// determine length of return string before doing addition
	numstr = num.toString(); 
	numstr_parts = numstr.split(p_dot);
	pnum_prec_length = numstr_parts[0].length + precision + 1;// pre-decimal + precision + decimal point
	// end of fix

	var pr = Math.pow( 10,(0 - precision - 1) );		// create precision # + xtra tenth
	var pn = num + pr;  
	var pnum = pn.toString();				// turn value to a string
	var pnumtrunc = pnum.substring(0, pnum_prec_length);	// truncate xtra tenth
	return  pnumtrunc; 
}

