function detectBrowser() {
	var b="";

	if(document.layers)
        	b="NN4";
    	if(document.all)
             b="ie"
    	if(!document.all && document.getElementById)
             b="NN6";

	return b;
}

function writeFlash(url,width,height,divname,page,imglink,hspace,vspace) {
/*************************************************************************
		url = link to the flash file
		width = width of the flash file
		height = height of the flash file
		divname = name or id of the div that wishes to be displayed
		page = which page the flash file is on (for top_banner)
		imglink = link of the image for top_banner
		hspace = horizontal space for the flash file
		vspace = vertical space for the flash file
**************************************************************************/
	var b = detectBrowser();
	
	var fg= 
		"<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\""+width+"\" height=\""+height+"\" hspace=\""+hspace+"\" vspace=\""+vspace+"\" >"
		+ "<param name=\"AllowScriptAccess\" value=\"sameDomain\" />"
		+ "<param name=FlashVars value=\"web_pageName="+page+"&web_imgName="+imglink+"\" />"
		+ "<param name=\"movie\" value=\""+url+"\" />"
		+ "<param name=\"quality\" value=\"high\" />"
		+ "<param name=\"wmode\" value=\"transparent\" />"
		+ "<embed src=\""+url+"\" FlashVars=\"web_pageName="+page+"&web_imgName="+imglink+"\" quality=\"high\" width=\""+width+"\" wmode=\"transparent\" height=\""+height+"\" hspace=\""+hspace+"\" vspace=\""+vspace+"\" name=\"flash\" AllowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"
		+ "</object>";
		
	if(b=="ie")
		document.getElementById(divname).innerHTML = fg;
	else if(b=="NN6")
		document.getElementById(divname).innerHTML = fg;
	else if(b=="NN4")
	{
		document.flash.document.open();
		document.flash.document.write(fg);
		document.flash.document.close();
	}
}