var name,version,folder,quote;

function startProductPage(title){
	document.write("<div style='margin-top: 0px;'><table border=0 cellSpacing=0 cellPadding=0 width='99%' height='100%' >");
	startHeader();
	printProductLogo();
	endHeader(folder,false,quotes[getRandom(quotes.length-1)]);
	startSubPage();	
	printProductLeftMenu();
	document.write("<td class=content valign=top style='border-bottom:#cccccc 1px solid;padding:15px;' height='100%' width='100%'>");
	if(title!=''){
		document.write("<h1>"+title+"</h1>");		
		drawLine();
	}
}
function endProductPage(){
	endContent();
	

	document.write("<td valign=top style='border-bottom:#cccccc 1px solid;' height='100%' width=150 nowrap>&nbsp;</td>");

	//endSubPage();
	document.write("</tr></table>");
	printFooter();

	document.write("</table></div>");
}

function writeLocation(title,href,location,tag){
	if(!tag)tag="";
	else tag+= " &#187; "
	if(href.indexOf(".")<0)href += ".htm";
	document.write("<div class=fine_print style='padding-bottom:2px;padding-top:2px;'><a href='index.htm'>"+ name +"</a> &#187; <a href='"+href+"'>"+ title +"</a> &#187; "+ tag + location + "</div>");
	drawLine();
}

function printProductLogo(){	
	document.write("<a href='index.htm'>");
	if(ie){
		document.write("<iframe style='cursor:hand;' marginWidth=0 marginHeight=0 frameBorder=0 width=468 scrolling=no height=60 allowTransparency ");
		document.write(" src='banner.htm' "); 
		document.write("></iframe>");
	}else{
		document.write("<img src='banner.gif' border=0 vspace=5 hspace=7>"); 
	}
	document.write("</a>");
}

function printProductLeftMenu(){	
	var menus = new Array(
		new Array("Home","index"),
		new Array("Features","features"),
		new Array("Screen Shots","shots"),				
		new Array("Live Demo","demo"),
		new Array("Download","download"),				
		new Array("Licensing","license"),		
		new Array("Purchase","purchase"),		
		new Array("Support","support"),
		new Array("Quick Reference","api"),
		new Array("Online Manual","manual"),
		new Array("Contact Us","contact"),
		new Array("Discussion Area","../../forums"),
		new Array("User Opinions","http://www.download.com/3302-7959_4-10278335.html"),
		new Array("Site Home","../../")
	);
	
	document.write("<td style='border-bottom:#cccccc 1px solid;border-top:#cccccc 1px solid;' valign=top nowrap class=p_menu  height='100%' width=140>");
	
	document.write("<div style='background-color:white;font-weight:bold;border:1px dotted #cccccc;padding:3px;margin:5px;margin-bottom:10px;'>");
	document.write("<b>Current Version:</b> "+ version +"</div>");

	document.write("<table border=0 cellspacing=0 cellpadding=2 align=right width=130>");	
	for(var i=0;i<menus.length;i++){		
		var url = menus[i][1];
		var target = "";
		if(url.indexOf("http://")>-1){
			target=" target=_blank ";
		}
		if(url.indexOf(".")<0) url += ".htm";
		var className = "p_menu";
		if(window.location.toString().indexOf(url)>-1){className += "_selected";menus[i][0]+=" &#187;"}
		document.write("<tr><td class="+ className +" nowrap>&nbsp;<a class="+ className +" href='"+ url +"'" + target + ">"+ menus[i][0] +"</a></td></tr>");
		if(i==4 || i==6 || i==10)document.write("<tr><td>&nbsp;</td></tr>");
	}	
	document.write("<tr><td>&nbsp;</td></tr></table>");
	document.write("</td>");
	
}	

function showImg(url,title,w,h) {
	var text =  "<html><head><title>"+title+"</title>";
	text += "<body style='margin:1px;'>";
	text += "<center>";
	text += "<img src='"+ url +"' alt='"+ title+"'>";
	text += "</center></body></html>";
	w=(isNaN(w))?500:w;
	if(w<1)w=500;
	h=(isNaN(h))?400:h;
	windowProp(text,w,h);
}
function windowProp(text,w,h) {
newWindow = window.open('','newWin','width='+w+',height='+h);
newWindow.document.write(text);
}

function loadImage(v){
	document.images["game"].src="images/" + v + ".gif" 
}
