var newwindow = '';
function popitup(url,height,width,caption,photographer) {
	url = "/image/"+url;
	width=parseInt(width)+25;
	height=parseInt(height)+25;
if (caption != '' || photographer != ''){
	height=parseInt(height)+35;
}
	var options = "width="+width+",height="+height+",resizable=1"
if (newwindow.location && !newwindow.closed) {
    newwindow.close()
}
    if (photographer != ''){
     	photographer = "(Photo By "+photographer+")";
    }
    newwindow=window.open("",'htmlname',options);
    var frameString=""+
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\""+
"\"http://www.w3.org/TR/html4/loose.dtd\">"+
"<html>"+
"<head>"+
"<title>"+caption+" // "+photographer+"</title>"+
"</head><body>"+
"<img src='"+url+"'></img>"+
"<font size='-1' color='grey'>"+caption+"</font><br>"+
"<font size='-1' color='grey'>"+photographer+"</font>"+
"</body></html>"
    newwindow.document.open();
    newwindow.document.write(frameString)
    newwindow.document.close()
    newwindow.focus()   
}

function online_help(text,height,width) {
if (width != ''){
	width=parseInt(width);
}else{
	width=300;
}
if (height != ''){
	height=parseInt(height);
}else{
	height=300;
}
var options = "width="+width+",height="+height+",resizable=1"
if (newwindow.location && !newwindow.closed) {
    newwindow.close()
}
    newwindow=window.open("",'htmlname',options);
    var frameString=""+
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\""+
"\"http://www.w3.org/TR/html4/loose.dtd\">"+
"<html>"+
"<head>"+
"<title>TheRacingWorld.com Online Help</title>"+
"</head><body>"+
"<font size='-1' color='black'>"+text+"</font>"+
"<p><center><a style='font-size:10px' href='javascript:window.close();'>Close Window</a></center></p>"+
"</body></html>"
    newwindow.document.open();
    newwindow.document.write(frameString)
    newwindow.document.close()
    newwindow.focus()   
}

function tidy() {
if (newwindow.location && !newwindow.closed) {
   newwindow.close(); }
}
