﻿function DemoPopup(filename) {
		
var pWindow=window.open(filename,'filename','width=1037,height=735,scrollbars=no,location=no,menubar=no,toolbar=no,resizable=no,status=no,locationbar=no');
pWindow.focus();
		
}

// Writes the Demo promo flash - the small demo player in the content
function showClickDemo(demoProduct) {
	//clickNum refers to the product name and is written based on the product id
	var clickNum = clickNum;
	var demoProduct = demoProduct;
	
	if (demoProduct == "QMS@@")
	{
	
	//var so = new SWFObject(clickNum , "clickDemo", "474", "302", "8", "Transparent");
	var so = new SWFObject("../clickProductsQMSDemo.swf" , "clickDemo", "474", "302", "8", "Transparent");
	so.addParam("menu", "false");
	so.addParam("scale", "noscale");
	so.addParam("wmode", "Transparent");
   	so.write("cickDemoHolder");
	  
	} else {
	
	//var so = new SWFObject(clickNum , "clickDemo", "474", "302", "8", "Transparent");
	var so = new SWFObject("../clickProductsDemos.swf" , "clickDemo", "474", "302", "8", "Transparent");
	so.addParam("menu", "false");
	so.addParam("scale", "noscale");
	so.addParam("wmode", "Transparent");
	so.addVariable("FLVid", demoProduct.replace("&", "^"));
   	so.write("cickDemoHolder");
   	}
}


// Called when a Demo button is clicked
function showDemo(DemoProduct) {
	
	// Show the semi-transparent demo background div
    var unhideDemoBG;
	unhideDemoBG = document.getElementById("DemoBG");
    unhideDemoBG.className = 'DemoBG';
    
    // Show the div containing the flash
    var unhideDemoHolder;
	unhideDemoHolder = document.getElementById("DemoHolder");
    unhideDemoHolder.className = 'DemoHolder';
    
    // DemoProduct refers to the product name and is written in the hyperlink in the flash and on the View Demo link on the page which calls the showDemo function
    // The DemoProduct variable will determine which full demo to pop up
	var DemoProduct = DemoProduct;
	
    //var so = new SWFObject("../ViewDocument.aspx?f=mediaPlayer.swf", "Demo", "874", "594", "8", "Transparent");
    var so = new SWFObject("../mediaPlayer.swf", "Demo", "874", "594", "8", "Transparent");
	so.addParam("menu", "false");
	so.addParam("scale", "noscale");
	so.addParam("wmode", "Transparent");
	so.addVariable("FLVid", DemoProduct);
   	so.write("DemoFlashHolder");
}

// Called when the "Close" button is clicked in the demo flash
function hideDemo() {
	// Hide the div holding the letter flash
    var hideDemoBG;
	hideDemoBG = document.getElementById("DemoBG");
    hideDemoBG.className = 'contentHidden';
    
    var hideDemoHolder;
	hideDemoHolder = document.getElementById("DemoHolder");
    hideDemoHolder.className = 'contentHidden';
}