var tbro='nn'
var isopera=false
if(document.all){tbro='ie'}
if(navigator.appName=="Netscape"){tbro='ienn'}
var navp=navigator.platform
var navpp=navp
if(navp=='MacPPC'||navp=='Mac68K'){navp='Mac'}
if(navigator.userAgent.indexOf('Opera')>-1){isopera=true}
if(navigator.userAgent.indexOf('KHTML')>-1){iskhtml=true}

function Random(N) { return Math.floor(N*(Math.random()%1)) }

function openactivity2(theactivity, wwidth, hheight){
	wwidth=1000
	hheight=700
	lpos=(screen.width-wwidth)/2
	tpos=(screen.height-hheight)/4
	openstring = 'left=' + lpos +',top=' + tpos + ',status=yes,resizable=yes,toolbar=yes,scrollbars=no,width=' + wwidth + ',height=' + hheight
	KS = window.open(theactivity, 'acbt' + (Random(1000)), openstring);
	if (KS){
		KS.focus()
	}else{
	//	alert ("You may have a popup blocker installed. This will need to be disabled to run these demos.")
	}
}

function openactivity3(theactivity, wwidth, hheight){
	if (wwidth==''){wwidth=640}
	if (hheight==''){hheight=512}
	lpos=(screen.width-wwidth)/2
	tpos=(screen.height-hheight)/4
	openstring = 'left=' + lpos +',top=' + tpos + ',status=no,resizable=yes,toolbar=no,scrollbars=no,width=' + wwidth + ',height=' + hheight
	KS = window.open(theactivity, 'acbt' + (Random(1000)), openstring);
	if (KS){
		KS.focus()
	}else{
		alert ("You may have a popup blocker installed. This will need to be disabled to run these demos.")
	}
}

function openactivity4(theactivity, wwidth, hheight){
	if (wwidth==''){wwidth=640}
	if (hheight==''){hheight=512}
	wwidth=screen.availWidth
	hheight=screen.availHeight
	lpos=0
	tpos=0
	if (tbro=='ie'&&navpp=='Win32'){
		openstring="fullscreen,resizable=yes"
	}else{
		openstring = 'left=' + lpos +',top=' + tpos + ',fullscreen=yes,status=no,resizable=yes,toolbar=no,scrollbars=no,width=' + wwidth + ',height=' + hheight
	}
	KS = window.open(theactivity, 'acbt' + (Random(1000)), openstring);
	if (KS){
		KS.focus()
	}else{
		alert ("You may have a popup blocker installed. This will need to be disabled to run these demos.")
	}
}

function replace(rstring,rwith,rwith2){
	do{
		rstring=rstring.replace(rwith, rwith2)
	}
	while (rstring.indexOf(rwith, 1) > 0)
	return rstring
}



function domenu(keepopen){
	document.write ("<CENTER><TABLE WIDTH=980px bgcolor=white border=0 cellspacing=0 cellpadding=0>")
	document.write ("<TR><TD valign=top>")
	itouse="kptitle2b.jpg"
	if (document.title=="KnowledgePresenter"){itouse="kpsmall.jpg"}
	if (document.title=="Learning Management System - KP Learner Manager Enterprise Edition"){itouse="kplmesmall.jpg"}
	if (document.title=="Learning Management System - KP Learner Manager Standard Edition"){itouse="kplmesmall.jpg"}
	if (document.title=="KnowledgePresenter University"){itouse="kpusmall.jpg"}
	//if (document.title=="KnowledgePresenter Q"){itouse="kpqsmall.jpg"}
	if (document.title.indexOf("KnowledgePresenter Q")>-1||document.title.indexOf("KPQ")>-1||document.title.indexOf("KP-Q")>-1){itouse="kpqsmall.jpg"}
	if (document.title.indexOf("KP-Simulator")>-1){itouse="kpssmall.jpg"}
	if (document.title.indexOf("KP-DocumentaryMaker")>-1){itouse="kpdmsmall.jpg"}
	if (document.title.indexOf("KP-Capture")>-1){itouse="kpcsmall.jpg"}
	if (document.title.indexOf("KP-ReviewIt")>-1){itouse="kprsmall.jpg"}
	if (document.title=="Introduction to Windows 7 courseware"){itouse="w7small.jpg"}
	if (document.title=="Take Perfect Photos"){itouse="tppsmall.jpg"}
	document.write ("<IMG SRC='" + itouse + "' width=147 height=100 style='margin-top:0px;'><IMG SRC='kptitle2a.jpg' style='margin-top:0px;' width=833 height=100></TD></TR>")
	document.write ("<TR><TD bgcolor='#000040' valign=middle align=center><P class=header>")
	document.write ("<A class=headerx HREF='home.htm'>Home</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='products.htm'>Products</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='onlinetrials.htm'>30 Day Trials</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='demomain.htm'>Demos</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='download.htm'>Downloads</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	//document.write ("<A class=headerx HREF='tours.htm'>Tours</A>")
	//document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='shows.htm'>News</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='purchase.htm'>Shop</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='kpuni.htm'>KP Uni</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='support.htm'>Support</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='aboutus.htm'>About Us</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='contactus.htm'>Contact Us</A>")
	document.write ("<IMG class=spacer SRC='spacer.gif' align=absmiddle>")
	document.write ("<A class=headerx HREF='downloadreleasev7.html'><FONT COLOR=yellow>Registered Users</FONT></A>")
	if (keepopen==1){
		document.write ("</TD></TR><TR><TD>")
	}else{
		document.write ("</TD></TR></TABLE>")
	}
}

