// JavaScript Document

function insertProphomeflash(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=9,0,28,0" width="755" height="200">';
	obj += '<param name="movie" value="'+ ctmPath +'/media/PropHome_flash.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/PropHome_flash.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="755" height="200"></embed>';
	obj +=  '</object>';
	document.write(obj);
  }
    
function insertspaceplaner(fpImage,csspath,propname,proparea)
  {
	var insertsp;
	insertsp = '<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="1000" height="600" id="Furniture_placement_v3" align="middle">';
	insertsp += '<param name="allowScriptAccess" value="sameDomain" />';
	insertsp += '<param name="movie" value="../media/SpacePlanner.swf" />';
	insertsp += '<param name="menu" value="false" /><param name="quality" value="best" />';
	insertsp += '<param name="bgcolor" value="0xffffff" />';
	insertsp += '<param name="wmode" value="transparent" />';
	insertsp += '<PARAM NAME=FlashVars VALUE="floorplan=' + fpImage + '&cssPath='  + csspath + '/SpacePlannerStyle.css&sPropName='+ propname +'&sPropArea='+ proparea +'">';
	insertsp += '<embed src="../media/SpacePlanner.swf" menu="false" quality="best" FlashVars="floorplan=' + fpImage +  '&cssPath='  + csspath + '/SpacePlannerStyle.css&sPropName='+ propname +'&sPropArea='+ proparea +'" bgcolor="0xffffff" width="1000" height="600" wmode="transparent" name="Furniture_placement" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	insertsp += '</object>';
	return insertsp;
  }


/*function insertPhotoGallery(cmsPath,sProperty)
   {
   	var soutlinecolor='0x4F2100';
   	var splaypausecolor='0xffffff';
   	var sthumbnailcolor='0x4F2100';
   	var scontrolcolor='0x4F2100';
   	   	
	document.write('<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="450" height="500" id="photogallery" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="' + cmsPath +'/media/photogallery.swf" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<PARAM NAME=FlashVars VALUE="cmsPath='+cmsPath+'/xml/&sproperty=' + sProperty + '&outlinecolor='+ soutlinecolor +'&playpausecolor='+ splaypausecolor +'&thumbnailcolor='+ sthumbnailcolor +'&controlcolor='+ scontrolcolor +'"/>');
	document.write('<embed src="' + cmsPath +'/media/photogallery.swf" FlashVars="cmsPath='+cmsPath+'/xml/&sproperty=' + sProperty + '&outlinecolor='+ soutlinecolor +'&playpausecolor='+ splaypausecolor +'&thumbnailcolor='+ sthumbnailcolor +'&controlcolor='+ scontrolcolor +'" menu="false" wmode="transparent" quality="high"   width="450" height="500" name="photogallery" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
  }  
*/

function insertPhotoGallery(cmsPath,sProperty)
   {
   	var soutlinecolor='0x4F2100';
   	var splaypausecolor='0xffffff';
   	var sthumbnailcolor='0x4F2100';
   	var scontrolcolor='0x4F2100';
	var insertpg;
   	   	
	insertpg = '<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="450" height="500" id="photogallery" align="middle">';
	insertpg += '<param name="allowScriptAccess" value="sameDomain" />';
	insertpg += '<param name="movie" value="' + cmsPath +'/media/photogallery.swf" />';
	insertpg += '<param name="menu" value="false" />';
	insertpg += '<param name="quality" value="high" />';
	insertpg += '<param name="wmode" value="transparent" />';
	insertpg += '<PARAM NAME=FlashVars VALUE="cmsPath='+cmsPath+'/xml/&sproperty=' + sProperty + '&outlinecolor='+ soutlinecolor +'&playpausecolor='+ splaypausecolor +'&thumbnailcolor='+ sthumbnailcolor +'&controlcolor='+ scontrolcolor +'"/>';
	insertpg += '<embed src="' + cmsPath +'/media/photogallery.swf" FlashVars="cmsPath='+cmsPath+'/xml/&sproperty=' + sProperty + '&outlinecolor='+ soutlinecolor +'&playpausecolor='+ splaypausecolor +'&thumbnailcolor='+ sthumbnailcolor +'&controlcolor='+ scontrolcolor +'" menu="false" wmode="transparent" quality="high"   width="450" height="500" name="photogallery" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	insertpg += '</object>';
	return insertpg;
  }


  function insertebrochure(sProperty)
{
	var inserteb;
	inserteb = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1300" height="650" id="ebrochure" align="middle">';
	inserteb += '<param name="allowScriptAccess" value="sameDomain" />';
	inserteb += '<param name="movie" value="../media/ebrochure.swf" />';
	inserteb += '<param name="menu" value="false" /><param name="quality" value="best" />';
	inserteb += '<param name="bgcolor" value="#ffffff" />';
	inserteb += '<param name="wmode" value="transparent" />';
	inserteb += '<PARAM NAME=FlashVars VALUE="sproperty=../xml/' + sProperty + '_ebro.xml">';
	inserteb += '<embed src="../media/ebrochure.swf" menu="false" quality="best" FlashVars="sproperty=../xml/'+sProperty+'_ebro.xml" bgcolor="#ffffff" width="1300" height="650" wmode="transparent" name="ebrochure" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	inserteb += '</object>';
	document.write(inserteb);
}

function insertcorphomeflash(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="960" height="375">';
	obj += '<param name="movie" value="'+ ctmPath +'/media/CorpHome_Flash.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/CorpHome_Flash.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="960" height="375"></embed>';
	obj +=  '</object>';
//alert(obj);
	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)
{
	//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;
	Data=inputXML.replace(/\"/g,'\'');

    strXML = "<map animation='1' fillAngle='90' showCanvasBorder='1' canvasBorderColor='#ffffff' 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'>"
    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="300" height="200" id="firstMap">';
	obj += '<param name="allowScriptAccess" value="always" />';
	obj += '<param name="movie" value="../Media/Maps/FCMap_USA.swf" />';
	obj += '<param name="FlashVars" value="&mapWidth=300&mapHeight=200&debugMode=0&mapX=0&mapY=-20&dataXML=' + strXML + '"/>';
	obj += '<param name="quality" value="high" />';
	obj += '<embed src="../Media/Maps/FCMap_USA.swf" FlashVars="&mapWidth=300&mapHeight=200&debugMode=0&mapX=0&mapY=-20&dataXML=' + strXML + '" quality="high" width="300" height="200" name="firstMap" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	document.write(obj);
	
}
function insertCommProphomeflash(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=9,0,28,0" width="1000" height="338">';
	obj += '<param name="movie" value="'+ ctmPath +'/media/CommPropHome_flash.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/CommPropHome_flash.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="1000" height="338"></embed>';
	obj +=  '</object>';
	document.write(obj);
  }
function insertCommCorphomeflash(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=9,0,28,0" width="962" height="343">';
	obj += '<param name="movie" value="'+ ctmPath +'/media/CommCorpHome_flash.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/CommCorpHome_flash.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="962" height="343"></embed>';
	obj +=  '</object>';
	document.write(obj);
  }

function inserthomeflash(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="960" height="375">';
	obj += '<param name="movie" value="'+ ctmPath +'/media/CorpHome_Flash.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/CorpHome_Flash.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="960" height="375"></embed>';
	obj +=  '</object>';
//alert(obj);
	document.write(obj);
   }
