// JavaScript Document

 
function insertcorphomeflash1(ctmPath,iSpeed,sFade,iRepeat,sProperty)
   {	
   	var obj;
	obj = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="165" height="445">';
	obj += '<param name="movie" value="'+ ctmPath +'/media/BKH_homeflash1.swf" />';
	obj += '<param name="wmode" value="transparent" />';
	obj += '<param name="quality" value="high" />';
	obj += '<param name="FlashVars" value="effect='+ sFade +'&repeat=' + iRepeat + '&speed=' + iSpeed + '&sproperty='+ ctmPath +'/xml/'+ sProperty +'_FG.xml"/>';	
	obj += '<embed src="'+ ctmPath +'/media/BKH_homeflash1.swf" wmode="transparent" FlashVars="effect='+ sFade +'&repeat=' + iRepeat + '&speed=' + iSpeed + '&sproperty='+ ctmPath +'/xml/'+ sProperty +'_FG.xml" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="165" height="445"></embed>';
	obj +=  '</object>';
	document.write(obj);
   }

function insertcorphomeflash2(ctmPath,iSpeed,sFade,iRepeat,sProperty)
   {	
   	var obj;
	obj = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="376" height="406">';
	obj += '<param name="movie" value="'+ ctmPath +'/media/BKH_homeflash2.swf" />';
	obj += '<param name="wmode" value="transparent" />';
	obj += '<param name="quality" value="high" />';
	obj += '<param name="FlashVars" value="effect='+ sFade +'&repeat=' + iRepeat + '&speed=' + iSpeed + '&sproperty='+ ctmPath +'/xml/'+ sProperty +'_FG.xml"/>';	
	obj += '<embed src="'+ ctmPath +'/media/BKH_homeflash2.swf" wmode="transparent" FlashVars="effect='+ sFade +'&repeat=' + iRepeat + '&speed=' + iSpeed + '&sproperty='+ ctmPath +'/xml/'+ sProperty +'_FG.xml" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="376" height="406"></embed>';
	obj +=  '</object>';
	document.write(obj);
   }
   
function insertcorpInnerflash(ctmPath,iSpeed,sFade,iRepeat,sProperty)
   {	
   	var obj;
	obj = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="464" height="406">';
	obj += '<param name="movie" value="'+ ctmPath +'/media/BKH_Innerflash.swf" />';
	obj += '<param name="wmode" value="transparent" />';
	obj += '<param name="quality" value="high" />';
	obj += '<param name="FlashVars" value="effect='+ sFade +'&repeat=' + iRepeat + '&speed=' + iSpeed + '&sproperty='+ ctmPath +'/xml/'+ sProperty +'_FG.xml"/>';	
	obj += '<embed src="'+ ctmPath +'/media/BKH_Innerflash.swf" wmode="transparent" FlashVars="effect='+ sFade +'&repeat=' + iRepeat + '&speed=' + iSpeed + '&sproperty='+ ctmPath +'/xml/'+ sProperty +'_FG.xml" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="464" height="406"></embed>';
	obj +=  '</object>';
	document.write(obj);
   }
   
function insertCorporatePhotoGallery(cmsPath,sProperty)
   {
   	var soutlinecolor='0x919191';
    	var splaypausecolor='0xffffff';
    	var sthumbnailcolor='0x919191';
    	var scontrolcolor='0x919191';
    	var sWidth = 430;
    	var sHeight = 370;
	var insertCpg; 
   	   	
insertCpg='<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="430" height="370" id="photogallery" align="middle">';
	insertCpg+='<param name="allowScriptAccess" value="sameDomain" />';
	insertCpg+='<param name="movie" value="' + cmsPath +'/media/photogallery_Corporate.swf" />';
	insertCpg+='<param name="menu" value="false" />';
	insertCpg+='<param name="quality" value="high" />';
	insertCpg+='<param name="wmode" value="transparent" />';
	insertCpg+='<PARAM NAME=FlashVars VALUE="cmsPath='+cmsPath+'/xml/&sproperty=' + sProperty + '&outlinecolor='+ soutlinecolor +'&playpausecolor='+ splaypausecolor +'&thumbnailcolor='+ sthumbnailcolor +'&controlcolor='+ scontrolcolor +'&width='+ sWidth +'&height='+ sHeight +'"/>';
	insertCpg+='<embed src="' + cmsPath +'/media/photogallery_Corporate.swf" FlashVars="cmsPath='+cmsPath+'/xml/&sproperty=' + sProperty + '&outlinecolor='+ soutlinecolor +'&playpausecolor='+ splaypausecolor +'&thumbnailcolor='+ sthumbnailcolor +'&controlcolor='+ scontrolcolor +'&width='+ sWidth +'&height='+ sHeight +'" menu="false" wmode="transparent" quality="high"   width="430" height="370" name="photogallery" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	insertCpg+='</object>';
	return insertCpg;
  }  


function insertCorporateFusionMap(inputXML,MapName)
{
	//Note: mapX and MapY are used to set x and y co-ordinates for the map. To shift the map towards left and top give -ve dimensions.
	var obj;
	var strXML;
	var Data;
	var FlashFileName;
	Data=inputXML.replace(/\"/g,'\'');
	FlashFileName= 'FCMap_' + MapName + '.swf';
	
    strXML = "<map animation='1' fillAngle='90' showCanvasBorder='0' canvasBorderColor='#ffffff' showShadow='1' showBevel='1' showLabels='1' showMarkerLabels='1' hoverColor='#dbe8a1' bgcolor='#ffffff' fillAlpha='100'   showlegend='0' showToolTip='1' fillColor='#a8dfec' borderColor='#59b5c2' includeValueInLabels='0' labelSepChar=': ' baseFontSize='8' showMarkerToolTip='1'  baseFontColor='#000000' useHoverColor='1' activeColor='34b0ce' setTransparency='true' bgAlpha='0'>"
    strXML = strXML + Data
    strXML = strXML + "<styles>	<definition><style type='animation' name='animX' param='noScale' start='0' duration='1' /><style type='animation' name='animY' param='noScale' start='0' duration='5' /><style type='animation' name='animAlpha' param='_alpha' start='0' duration='1' /><style type=' ' name='myShadow' color='ffffff' distance='1' /></definition><application><apply toObject='PLOT' styles='animX,animY' />	<apply toObject='LABELS' styles='myShadow,animAlpha' /></application></styles>"
    strXML = strXML + "</map>"
    
   	
	obj = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="240" height="200" id="firstMap">';
	obj += '<param name="allowScriptAccess" value="always" />';
	obj += '<param name="movie" value="../Media/Maps/' + FlashFileName + '" />';
	obj += '<param name="FlashVars" value="&mapWidth=240&mapHeight=200&debugMode=0&mapX=0&mapY=-30&dataXML=' + strXML + '"/>';
	obj += '<param name="quality" value="high" />';
	obj += '<param name="wmode" value="transparent" />';
	obj += '<embed src="../Media/Maps/' + FlashFileName + '" FlashVars="&mapWidth=240&mapHeight=200&debugMode=0&mapX=0&mapY=-30&dataXML=' + strXML + '" quality="high" width="240" height="200" wmode="transparent" name="firstMap" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	document.write(obj);
	
}
