function swfQuery(category, productID, src, height, width){
	var width = width;
	var height = height;
	var src = src;
	var queries = '?category='+category+'&prodId='+ productID;

	// assemble flash obj
	var swf ="";
	swf += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">';
	swf += '<param name="allowScriptAccess" value="always" />';
	swf += '<param name="movie" value="' + src + queries + '" />';
	swf += '<param name="quality" value="high" />';
	swf += '<param name="wmode" value="transparent">';
	swf += '<embed src="' + src + queries + '"';
	swf += 'quality="high"';
	swf += 'wmode="transparent"';
	swf += 'pluginspage="http://www.macromedia.com/go/getflashplayer"';
	swf += 'type="application/x-shockwave-flash"';
	swf += 'width="' + width + '"';
	swf += 'height="' + height + '">';
	swf += '</embed>';
	swf += '</object>';
	
	// write all lines
	document.write(swf);
	//document.write("queries = " + queries);
}
function swf(src, height, width){
	var width = width;
	var height = height;
	var src = src;

	// assemble flash obj
	var swf ="";
	swf += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">';
	swf += '<param name="allowScriptAccess" value="always" />';
	swf += '<param name="movie" value="' + src + '" />';
	swf += '<param name="quality" value="high" />';
	swf += '<param name="wmode" value="transparent">';
	swf += '<embed src="' + src + '"';
	swf += 'quality="high"';
	swf += 'wmode="transparent"';	
	swf += 'pluginspage="http://www.macromedia.com/go/getflashplayer"';
	swf += 'type="application/x-shockwave-flash"';
	swf += 'width="' + width + '"';
	swf += 'height="' + height + '">';
	swf += '</embed>';
	swf += '</object>';

	// write all lines
	document.write(swf);
	//document.write("queries = " + queries);
}
function placeImage(image, height, width){
      var alternateContent = '<img src="' + image + '" width="' + width + '" height="' + height + '" border="0">';  
	  //document.write(alternateContent);
}

function placeSwf(src, image, height, width) {
	if(WM_pluginDetect('Flash 10', 'swf', 'application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash.10')) { 
		swf(src, height, width);
		} else if(WM_pluginDetect('Flash 9', 'swf', 'application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash.9')) { 
		swf(src, height, width);
	} else if(WM_pluginDetect('Flash 8', 'swf', 'application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash.8')) { 
		swf(src, height, width);
	} else if(WM_pluginDetect('Flash 7', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.7')) {
		swf(src, height, width);
	} else if(WM_pluginDetect('Flash 6', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.6')) { 
		swf(src, height, width);
	} else if(WM_pluginDetect('Flash 5', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.5')) { 
		swf(src, height, width);
	} else if(WM_pluginDetect('Flash 4', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.4')) { 
		swf(src, height, width);
	} else if(WM_pluginDetect('Flash 3', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.3')) { 
		swf(src, height, width);
	} else { 
		swf(image, height, width);
	}
}
function placeSwfQuery(category, productID, src, image, height, width){
	if(WM_pluginDetect('Flash 10', 'swf', 'application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash.10')) { 
		swfQuery(category, productID, src, height, width);
	}else if(WM_pluginDetect('Flash 9', 'swf', 'application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash.9')) { 
		swfQuery(category, productID, src, height, width);
	} else if(WM_pluginDetect('Flash 8', 'swf', 'application/x-shockwave-flash','ShockwaveFlash.ShockwaveFlash.8')) { 
		swfQuery(category, productID, src, height, width);
	} else if(WM_pluginDetect('Flash 7', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.7')) {
		swfQuery(category, productID, src, height, width);
	} else if(WM_pluginDetect('Flash 6', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.6')) { 
		swfQuery(category, productID, src, height, width);
	} else if(WM_pluginDetect('Flash 5', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.5')) { 
		swfQuery(category, productID, src, height, width);
	} else if(WM_pluginDetect('Flash 4', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.4')) { 
		swfQuery(category, productID, src, height, width);
	} else if(WM_pluginDetect('Flash 3', 'swf','application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash.3')) { 
		swfQuery(category, productID, src, height, width);
	} else { 
		placeImage(image, height, width);
	}
}
function openPDF(file){
	var newDoc = window.open("text/html","pdfWindow");
	newDoc.location.href = file;
}