//////////////////////////////////// 
function writeFlash( xName, xPath, W, H, xVars, xTrasp, xScale, xResponse ){
	
	xVars += "&appExt=php&";
	strSwf = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' + '\r';
	strSwf += 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ' + '\r'; 
	strSwf += 'width="' + W + '" height="' + H + '" id="' + xName + '" align="middle"> ' + '\r';
	strSwf += '<param name="FlashVars" value="' + xVars + '">' + '\r';
	if( xScale ) 				strSwf += '<param name="Scale" value="' + xScale + '">' + '\r';
	if( xTrasp==true ) 	strSwf += '<param name="wmode" value="transparent"> ' + '\r';
	strSwf += '<param name="allowScriptAccess" value="sameDomain"> ' + '\r';
	strSwf += '<param name="movie" value="' + xPath + '"> ' + '\r';
	strSwf += '<embed FlashVars="' + xVars + '"  ';
	strSwf += 'src="' + xPath + '" width="' + W + '" height="' + H + '" name="' + xName + '" align="middle" ' ;
	if( xScale ) 				strSwf += 'scale="' + xScale + '"  ';
	if( xTrasp==true ) 	strSwf += 'wmode="transparent" ';
	strSwf += 'swLiveConnect="true" ';
	strSwf += 'allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" /> ' + '\r';
	strSwf += '</object>';

	if( !xResponse ){
		document.write( strSwf );
	} else {
		return strSwf;
	}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////////////
function getDivStyle( xTg ){
	if( document.layers ){ 
		return eval('document.'+xTg); 
	}else if( document.all ){ 
		return eval('document.all.'+xTg+'.style'); 
	}
	var xDiv = document.getElementById(xTg);
	if( xDiv ) return xDiv.style;
	return;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////// 

////////////////////////////////////////////////////////////////////////////////////////////////////////////  Hide/View DIV
function setDivView( xDiv ){
	//////////////////////////////////// 
	var curDiv = getDivStyle(xDiv);
	//////////////////////////////////// 
	if(curDiv.display == "none"){

		curDiv.display = "";		
		getDivStyle("smartMenuClose").display = "";
		
	}else{
	
		curDiv.display = "none";
		getDivStyle("smartMenuClose").display = "none";
	
	}
//////////////////////////////////// 
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////// 