function sendflashvar (varname, varcontent){	
	
	var ie=document.all;
	//var nn6=document.getElementById&&!document.all;
	
	flasharea = document.getElementById("flashmain");
	//alert(flasharea);
	//if(window.flashmain) { 
	if (ie) {
		window.document["flashmain"].SetVariable(varname, varcontent);
		//alert("IE?");  
	} else {
	//if(document.flashmain) { 
		//alert("here");
		document.flashmain.SetVariable(varname, varcontent);
		//alert("varname="+varname);
		//alert("varcontent="+varcontent);
		//if ( flasharea.SetVariable(varname, varcontent) ) { 
			//alert("flashloaded");
		//} else { 
			//alert("ff?");
		//}
	}
}

function loadflash (flashfile, width, height, doc_id) {

	//NOTE!! because this is assigned an id/name of "flashmain", it is designed to load flash into the flashmain area
	//alert(flashfile+"<--flashfile** "+width+"<--width** "+height+"<--height** "+doc_id+"<--doc_id** ");

	var thecode = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" id=\""+doc_id+"\" width=\""+width+"\" height=\""+height+"\"><param name=\"movie\" value=\""+flashfile+"\"><param name=\"quality\" value=\"high\"><param name=\"wmode\" value=\"transparent\"><embed src=\""+flashfile+"\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\" name=\""+doc_id+"\"></embed></object>";
	document.writeln(thecode);
	//alert(thecode);
}
