var movie = "<embed id='player' src='http://www.itsmsolutions.com/video/ITSMPolestarSim.swf' width='480'  height='300' allowscriptaccess='always' allowfullscreen='true'>"
var stopm = "<img src='http://www.itsmsolutions.com/video/ITSMPolestarSim.gif'>"
function videoctrl(x){
	document.getElementById('videospot').innerHTML = x;
}
function videoend(){
	document.getElementById('videospot').innerHTML = stopm;
	showDiv('videobox',0)
}
function HideDityDiv(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowDityDiv(d) {
if(d.length < 1) { return; }
for (var x = 1; x <= 18; x++)
   {
   HideDityDiv('d'+x);
   }
document.getElementById(d).style.display = "block";
}

function showDiv(id,flagit) {
if (flagit=="1"){
if (document.layers) document.layers[''+id+''].visibility = "show"
else if (document.all) document.all[''+id+''].style.visibility = "visible"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}
else
if (flagit=="0"){
if (document.layers) document.layers[''+id+''].visibility = "hide"
else if (document.all) document.all[''+id+''].style.visibility = "hidden"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
}
}

function moveDiv(pos) {
document.getElementById('framebox').style.top = pos+'px';
showDiv('framebox',1);
}

function togDisp(id) {
if (document.getElementById(id).style.display == "block") {
	document.getElementById(id).style.display = "none"
} else {
	document.getElementById(id).style.display = "block"
}
}

function togVenueInputs(id) {
document.getElementById('errortext').innerHTML = '';
if (document.getElementById("PublicInputs")) document.getElementById("PublicInputs").style.display = "none"
if (document.getElementById("OnsiteInputs")) document.getElementById("OnsiteInputs").style.display = "none"
if (!(id=="none")) {
	document.getElementById(id).style.display = "block"
}
}

function togVis(id) {
if (document.getElementById(id).style.visibility == "visible") {
	document.getElementById(id).style.visibility = "hidden"
} else {
	document.getElementById(id).style.visibility = "visible"
}
}

function togVis(id) {
if (document.getElementById(id).style.visibility == "visible") {
	document.getElementById(id).style.visibility = "hidden"
} else {
	document.getElementById(id).style.visibility = "visible"
}
}

function showVenueInputs(id) {
showDiv("PublicInputs",0);
showDiv("OnsiteInputs",0);
if (!(id=="none")) {	
	showDiv(id,1);
}
}

function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '$' + num + '.' + cents);
}

function formframeSrc(src) {
	document.getElementById("formframe").src=src;
}
function demoframeSrc(src) {
	document.getElementById("demoframe").src=src;
}
function demo() {
	src = 'http://www.videotrainer.com/training/accts/careeracademy/courses/ITILFNDV3P01/shell/demo.htm';
	document.getElementById("demoframe").src=src;
}
function demoOLM() {
window.open ("http://itsmsolutions.videotrainer.com/demo_nlms.htm?acct=itsmsolutions&accountc=itsmsolutions", "_blank","location=0,status=0,scrollbars=1,menubar=0,resizable=1,directories=0,copyhistory=0,width=1020,height=823");
}
function demoOLW() {
window.open ("http://itsmsolutions.videotrainer.com/demo_nlms.htm?acct=itsmsolutions&accountc=itsmsolutions", "_blank","location=0,status=0,scrollbars=1,menubar=0,resizable=1,directories=0,copyhistory=0,width=1020,height=823");
}
function demoOLE() {
window.open ("http://itsmsolutions.itilprime.com/Public/pExamDemoOverview.aspx", "_blank","location=0,status=0,scrollbars=1,menubar=0,resizable=1,directories=0,copyhistory=0,width=1020,height=823");
}
function demoCourseware() {
window.open ("documents/itSM004_Sample.pdf", "_blank","location=0,status=0,scrollbars=1,menubar=0,resizable=1,directories=0,copyhistory=0");
}