/*----------------------------------------------------------------------------------
//Function Name: bumpersticker
//Purpose: Function to pass the Bumper sticker option to the Join Team Baker form
//Created Date: 18-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/
var bumper=0;
function bumpersticker(){
var bumper=1;
location.href='teamtisei.html?bumper='+bumper;
}

/*----------------------------------------------------------------------------------
//Function Name: sign_up
//Purpose: Function for creating the query string on click of sign-up/ Join Team Baker
//Created Date: 18-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

function sign_up(){
	var bumper=0;
	var_email=document.getElementById('e_addr').value;
	location.href='teamtisei.html?email='+var_email +'&bumper='+bumper;
	}
	
/*----------------------------------------------------------------------------------
//Function Name: cleartext
//Purpose: Function for clearing the input value for Email on click 
//Created Date: 10-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

	function cleartext(id){
	var initval = "Enter Email Address";
	var inp = document.getElementById(id).value;
	if (document.getElementById(id).value==initval){
	document.getElementById(id).value= "";
	}
	}

/*----------------------------------------------------------------------------------
//Function Name: init_val
//Purpose: Function to initialize the Email  on page load. Called on page load
//Created Date: 10-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

	function init_val(){
	document.getElementById('e_addr').value='Enter Email Address';
	}

/*----------------------------------------------------------------------------------
//Function Name: calculatePosition
//Purpose: To calculate the objects X position given its width
//Created Date: 26-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

function calculatePosition(objWidth){
var docWidth=document.body.clientWidth/2;
var windowWidth=objWidth/2;
var windowPosition=docWidth-windowWidth;
return windowPosition;
}

/*----------------------------------------------------------------------------------
//Function Name: calculatePosition
//Purpose: Function to open the Facebook Share window
//Created Date: 20-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

function openFBShare(){
var url = location.href;
var title = document.title;
var windowPosition=calculatePosition('620');
window.open("http://www.facebook.com/sharer.php?u="+url+"&t="+title,"","scrollbars,height=400, width=620, top=200,left="+windowPosition);
}

/*----------------------------------------------------------------------------------
//Function Name: overlayConversationQuestions
//Purpose: To display the Questions Overlay in Conversations Page 
//Created Date: 19-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

																													
	
      
		function overlayConversationQuestions(){ 
			if(window.frames[0].document.getElementById('player')){
			window.frames[0].document.getElementById('player').style.visibility="hidden";			
			window.frames[0].document.getElementsByTagName('embed')[0].style.display="none";
			}
		   var str = '<iframe height="620px" width="500px" allowTransparency="true" frameborder="0" scrolling="no" style="border:none"  src="https://bakerforgov.wufoo.com/embed/z7x2p1/"><a href="https://bakerforgov.wufoo.com/forms/z7x2p1/" title="Questions for Charlie" rel="nofollow">Fill out my Wufoo form!</a></iframe>';	
		   var msgw,msgh,bordercolor; 
		   msgw=600;//Width
		   msgh=700;//Height 
		   titleheight=25 //title Height
		   bordercolor="#DEDEDE";//boder color
		   titlecolor="#99CCFF";//title color
		  
		   var sWidth,sHeight; 
		   if (typeof(document.body.offsetWidth) == 'number'){
		   sWidth=document.body.offsetWidth; 
		   sHeight=document.body.offsetHeight; 
		   }
		   if (typeof(document.body.clientHeight) == 'number'){
		   sWidth=document.body.clientWidth; 
		   sHeight=document.body.clientHeight; 
		   }
		   var scrollDistanceVertical;
		   var scrollDistanceHorizontal;
		    if( typeof( window.pageYOffset ) == 'number' ){
			scrollDistanceVertical = window.pageYOffset;
			scrollDistanceHorizontal = window.pageXOffset;
			}else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			scrollDistanceVertical =  document.body.scrollTop;
			scrollDistanceHorizontal =  document.body.scrollLeft;
			}else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			scrollDistanceVertical = document.documentElement.scrollTop;
			scrollDistanceHorizontal = document.documentElement.scrollLeft;
			}

		   	var totalHeightVertical = scrollDistanceVertical + msgh;
			var totalHeightHorizontal = scrollDistanceHorizontal + msgw;
   if(sHeight < totalHeightVertical){
	sHeight = totalHeightVertical +100;
   }
    if(sWidth < totalHeightHorizontal){
	sWidth = totalHeightHorizontal +100;
   }
		   var bgObj=document.createElement("div"); 
		   bgObj.setAttribute('id','bgDiv'); 
		   bgObj.style.position="absolute"; 
		   bgObj.style.top="0"; 
		   bgObj.style.background="#000"; 
		   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
		   bgObj.style.opacity="0.8"; 
		   bgObj.style.left="0"; 
		   bgObj.style.width=sWidth + "px"; 
		   bgObj.style.height=sHeight + "px"; 
		   bgObj.style.zIndex = "10000"; 
		   bgObj.style.overflowY = "auto"; 
		   document.body.appendChild(bgObj); 
		    
		   var msgObj=document.createElement("div") 
		   msgObj.setAttribute("id","msgDiv"); 
		   msgObj.setAttribute("align","center"); 
		   msgObj.style.background="white"; 
		   msgObj.style.border="1px solid " + bordercolor; 
		   msgObj.style.position = "absolute"; 
		   msgObj.style.left = "42%"; 
		   msgObj.style.top = "14%"; 
		   msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
		   msgObj.style.marginLeft = "-225px" ; 
		    if(document.documentElement.scrollTop !=0){
			msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; 
			}
			else{
		msgObj.style.marginTop= -75+ document.body.scrollTop +"px";
			}
		    
		   msgObj.style.width = msgw + "px"; 
		   msgObj.style.height =msgh + "px"; 
		   msgObj.style.textAlign = "center"; 
		   msgObj.style.lineHeight ="25px"; 
		   msgObj.style.zIndex = "10001"; 
		    
		   var title=document.createElement("h4"); 
		   title.setAttribute("id","msgTitle"); 
		   //title.setAttribute("align","right"); 
		   title.style.margin="0"; 
		   title.style.padding="3px"; 
		   title.style.background=bordercolor; 
		   title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);"; 
		   title.style.opacity="0.75"; 
		   title.style.border="1px solid " + bordercolor; 
		   title.style.height="18px"; 
		   title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif"; 
		   title.style.fontWeight="Bold"; 
		   title.style.color="#404040"; 
		   title.style.cursor="pointer"; 
		   //var close = title.createElement("close");
		   title.innerHTML="<table width='100%'><tr><td align='left'><div align='left'>Question for Charlie?</div></td><td align='right'>Close</td></tr></table>"; 
		   title.onclick=function(){ 
		          document.body.removeChild(bgObj); 
		          document.getElementById("msgDiv").removeChild(title); 
		          document.body.removeChild(msgObj); 
				  if(window.frames[0].document.getElementById('player')){
				  window.frames[0].document.getElementsByTagName('embed')[0].style.display="block";
				 window.frames[0].document.getElementById('player').style.visibility="visible";	
				 }
		        } 
		   document.body.appendChild(msgObj); 
		   document.getElementById("msgDiv").appendChild(title); 
		   var txt=document.createElement("p"); 
		   txt.style.margin="1em 0" 
		   txt.setAttribute("id","msgTxt"); 
		   txt.innerHTML=str; 
		   document.getElementById("msgDiv").appendChild(txt); 		   
		} 

/*----------------------------------------------------------------------------------
//Function Name: sAlertBadgeHome
//Purpose: Function to display the overlay for Show your Support Online in home page
//Created Date: 19-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

function sAlertBadgeHome(){ 
   var str = '<iframe height="400px" width="420px" allowTransparency="true" frameborder="0" scrolling="no" style="border:none"  src="getbadge.php"></iframe>';	
   var msgw,msgh,bordercolor; 
   msgw=450;//Width
   msgh=450;//Height 
   titleheight=25 //title Height
   bordercolor="#DEDEDE";//boder color
   titlecolor="#99CCFF";//title color
   //Get the actual body height / width to set the width of the overlay background
   var sWidth,sHeight; 
   if (typeof(document.body.offsetWidth) == 'number'){
   sWidth=document.body.offsetWidth; 
   sHeight=document.body.offsetHeight; 
   }
   if (typeof(document.body.clientHeight) == 'number'){
   sWidth=document.body.clientWidth; 
   sHeight=document.body.clientHeight; 
   }
	var totalHeight = document.documentElement.scrollTop + msgh;
   if(sHeight < totalHeight){
	sHeight = totalHeight +100;
   }
   //Specify the attributes (opacity etc.) for the background of the overlay
   var bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv'); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background="#000"; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
   bgObj.style.opacity="0.8"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "10000"; 
   bgObj.style.overflowY = "auto"; 
   document.body.appendChild(bgObj); 
   //Create the Overlay Element and specify the overlay attributes  
   var msgObj=document.createElement("div") 
   msgObj.setAttribute("id","msgDiv"); 
   msgObj.setAttribute("align","center"); 
   msgObj.style.background="white"; 
   msgObj.style.border="1px solid " + bordercolor; 
   msgObj.style.position = "absolute"; 
   msgObj.style.left = "50%"; 
   msgObj.style.top = "25%"; 
   msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   msgObj.style.marginLeft = "-225px" ; 
   if(document.documentElement.scrollTop !=0){
   msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; 
   }
   else{
   msgObj.style.marginTop= -75+ document.body.scrollTop +"px";
   }
   msgObj.style.width = msgw + "px"; 
   msgObj.style.height =msgh + "px"; 
   msgObj.style.textAlign = "center"; 
   msgObj.style.lineHeight ="25px"; 
   msgObj.style.zIndex = "10001"; 
   //Create the Overlay Title and specify the  attributes 
   var title=document.createElement("h4"); 
   title.setAttribute("id","msgTitle"); 
   title.style.margin="0"; 
   title.style.padding="3px"; 
   title.style.background=bordercolor; 
   title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);"; 
   title.style.opacity="0.75"; 
   title.style.border="1px solid " + bordercolor; 
   title.style.height="18px"; 
   title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   title.style.fontWeight="Bold"; 
   title.style.color="#404040"; 
   title.style.cursor="pointer"; 
   title.innerHTML="<table width='100%'><tr><td align='left'><div align='left'><b>Select a Badge</b></div></td><td align='right'><b>Close</b></td></tr></table>"; 
   //Function for the actions to be done when the overlay is closed 
   title.onclick=function(){ 
          document.body.removeChild(bgObj); 
          document.getElementById("msgDiv").removeChild(title); 
          document.body.removeChild(msgObj); 
        } 
    //Load the required contents into the overlay
   document.body.appendChild(msgObj); 
   document.getElementById("msgDiv").appendChild(title); 
   var txt=document.createElement("p"); 
   txt.style.margin="1em 0" 
   txt.setAttribute("id","msgTxt"); 
   txt.innerHTML=str; 
   document.getElementById("msgDiv").appendChild(txt); 
  
} 


/*----------------------------------------------------------------------------------
//Function Name: sAlertFriendHome
//Purpose: Function to display the overlay for Tell A Friend in home page
//Created Date: 19-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

function sAlertFriendHome(){ 
   var str = '<iframe height="580px" width="450px" allowTransparency="true" frameborder="0" scrolling="no" style="border:none"  src="https://bakerforgov.wufoo.com/embed/m7x1w3/"><a href="https://bakerforgov.wufoo.com/forms/m7x1w3/" title="Tell A Friend" rel="nofollow">Fill out my Wufoo form!</a></iframe>';	
   var msgw,msgh,bordercolor; 
   msgw=600;//Width
   msgh=620;//Height 
   titleheight=25 //title Height
   bordercolor="#DEDEDE";//boder color
   titlecolor="#99CCFF";//title color
   //Get the actual body height / width to set the width of the overlay background
   var sWidth,sHeight; 
   if (typeof(document.body.offsetWidth) == 'number'){
   sWidth=document.body.offsetWidth; 
   sHeight=document.body.offsetHeight; 
   //sHeight=document.documentElement.scrollTop + msgh;
   }
   if (typeof(document.body.clientHeight) == 'number'){
   sWidth=document.body.clientWidth; 
   //sHeight=document.documentElement.scrollTop + msgh;
  sHeight=document.body.clientHeight; 
   }
   var totalHeight = document.documentElement.scrollTop + msgh;
   if(sHeight < totalHeight){
	sHeight = totalHeight +100;
   }
   //Specify the attributes (opacity etc.) for the background of the overlay
   var bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv'); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background="#000"; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
   bgObj.style.opacity="0.8"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "10000"; 
   bgObj.style.overflowY = "auto"; 
   document.body.appendChild(bgObj); 
   //Create the Overlay Element and specify the overlay attributes  
   var msgObj=document.createElement("div") 
   msgObj.setAttribute("id","msgDiv"); 
   msgObj.setAttribute("align","center"); 
   msgObj.style.background="white"; 
   msgObj.style.border="1px solid " + bordercolor; 
   msgObj.style.position = "absolute"; 
   msgObj.style.left = "44%"; 
   msgObj.style.top = "15%"; 
   msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   msgObj.style.marginLeft = "-225px" ; 
   if(document.documentElement.scrollTop !=0){
   msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; 
   }
   else{
   msgObj.style.marginTop= -75+ document.body.scrollTop +"px";
   }
   msgObj.style.width = msgw + "px"; 
   msgObj.style.height =msgh + "px"; 
   msgObj.style.textAlign = "center"; 
   msgObj.style.lineHeight ="25px"; 
   msgObj.style.zIndex = "10001"; 
   //Create the Overlay Title and specify the  attributes
   var title=document.createElement("h4"); 
   title.setAttribute("id","msgTitle"); 
   title.style.margin="0"; 
   title.style.padding="3px"; 
   title.style.background=bordercolor; 
   title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);"; 
   title.style.opacity="0.75"; 
   title.style.border="1px solid " + bordercolor; 
   title.style.height="18px"; 
   title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   title.style.fontWeight="Bold"; 
   title.style.color="#404040"; 
   title.style.cursor="pointer"; 
   title.innerHTML="<table width='100%'><tr><td align='left'><div align='left'>Tell A Friend</div></td><td align='right'>Close</td></tr></table>"; 
   //Function for the actions to be done when the overlay is closed
   title.onclick=function(){ 
          document.body.removeChild(bgObj); 
          document.getElementById("msgDiv").removeChild(title); 
          document.body.removeChild(msgObj); 
        } 
   //Load the required contents into the overlay	
   document.body.appendChild(msgObj); 
   document.getElementById("msgDiv").appendChild(title); 
   var txt=document.createElement("p"); 
   txt.style.margin="1em 0" 
   txt.setAttribute("id","msgTxt"); 
   txt.innerHTML=str; 
   document.getElementById("msgDiv").appendChild(txt); 
} 

/*----------------------------------------------------------------------------------
//Function Name: sAlertBadge
//Purpose: Function to display the overlay for Show your Support Online
//Created Date: 23-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/


function sAlertBadge(){ 
   //Hide the Directions Panel in Contacts Page- To hide the dropdown when the overlay is loaded.
   if(document.getElementById("getdirections")){
   document.getElementById("getdirections").style.visibility='hidden';	
   }
   var str = '<iframe height="400px" width="420px" allowTransparency="true" frameborder="0" scrolling="no" style="border:none"  src="getbadge.php"></iframe>';	
   var msgw,msgh,bordercolor; 
   msgw=450;//Width
   msgh=450;//Height 
   titleheight=25 //title Height
   bordercolor="#DEDEDE";//boder color
   titlecolor="#99CCFF";//title color
   //Get the actual body height / width to set the width of the overlay background
   var sWidth,sHeight; 
   if (typeof(document.body.offsetWidth) == 'number'){
   sWidth=document.body.offsetWidth; 
   sHeight=document.body.offsetHeight; 
   }
   if (typeof(document.body.clientHeight) == 'number'){
   sWidth=document.body.clientWidth; 
   sHeight=document.body.clientHeight; 
   }
   //Specify the attributes (opacity etc.) for the background of the overlay
   var bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv'); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background="#000"; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
   bgObj.style.opacity="0.8"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "10000"; 
   bgObj.style.overflowY = "auto"; 
   document.body.appendChild(bgObj); 
   //Create the Overlay Element and specify the overlay attributes 
   var msgObj=document.createElement("div") 
   msgObj.setAttribute("id","msgDiv"); 
   msgObj.setAttribute("align","center"); 
   msgObj.style.background="white"; 
   msgObj.style.border="1px solid " + bordercolor; 
   msgObj.style.position = "absolute"; 
   msgObj.style.left = "50%"; 
   msgObj.style.top = "30%"; 
   msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   msgObj.style.marginLeft = "-225px" ; 
    if(document.documentElement.scrollTop !=0){
   msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; 
   }
   else{
   msgObj.style.marginTop= -75+ document.body.scrollTop +"px";
   }
   msgObj.style.width = msgw + "px"; 
   msgObj.style.height =msgh + "px"; 
   msgObj.style.textAlign = "center"; 
   msgObj.style.lineHeight ="25px"; 
   msgObj.style.zIndex = "10001"; 
   //Create the Overlay Title and specify the  attributes 
   var title=document.createElement("h4"); 
   title.setAttribute("id","msgTitle"); 
   title.style.margin="0"; 
   title.style.padding="3px"; 
   title.style.background=bordercolor; 
   title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);"; 
   title.style.opacity="0.75"; 
   title.style.border="1px solid " + bordercolor; 
   title.style.height="18px"; 
   title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   title.style.fontWeight="Bold"; 
   title.style.color="#404040"; 
   title.style.cursor="pointer"; 
   title.innerHTML="<table width='100%'><tr><td align='left'><div align='left'><b>Select a Badge</b></div></td><td align='right'><b>Close</b></td></tr></table>";  
    //Function for the actions to be done when the overlay is closed
   title.onclick=function(){ 
          document.body.removeChild(bgObj); 
          document.getElementById("msgDiv").removeChild(title); 
          document.body.removeChild(msgObj); 
		   if(document.getElementById("getdirections")){
   document.getElementById("getdirections").style.visibility='visible';	
   }
        } 
	//Load the required contents into the overlay
   document.body.appendChild(msgObj); 
   document.getElementById("msgDiv").appendChild(title); 
   var txt=document.createElement("p"); 
   txt.style.margin="1em 0" 
   txt.setAttribute("id","msgTxt"); 
   txt.innerHTML=str; 
   document.getElementById("msgDiv").appendChild(txt); 
} 

/*----------------------------------------------------------------------------------
//Function Name: sAlertFriend
//Purpose: Function to display the overlay for Tell A Friend
//Created Date: 23-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

function sAlertFriend(){ 
 //Hide the Directions Panel in Contacts Page- To hide the dropdown when the overlay is loaded.
if(document.getElementById("getdirections")){
   document.getElementById("getdirections").style.visibility='hidden';	
   }
 //if(document.getElementById("Field111")){
 //document.getElementById("fo3li106").style.visibility='hidden';	
 //}
   var str = '<iframe height="600px" width="450px" allowTransparency="true" frameborder="0" scrolling="no" style="border:none"  src="https://bakerforgov.wufoo.com/embed/m7x1w3/"><a href="https://bakerforgov.wufoo.com/forms/m7x1w3/" title="Tell A Friend" rel="nofollow">Fill out my Wufoo form!</a></iframe>';	
   var msgw,msgh,bordercolor; 
   msgw=600;//Width
   msgh=650;//Height 
   titleheight=25 //title Height
   bordercolor="#DEDEDE";//boder color
   titlecolor="#99CCFF";//title color
   //Get the actual body height / width to set the width of the overlay background
   var sWidth,sHeight; 
   if (typeof(document.body.offsetWidth) == 'number'){
   sWidth=document.body.offsetWidth; 
   sHeight=document.body.offsetHeight; 
   }
   if (typeof(document.body.clientHeight) == 'number'){
   sWidth=document.body.clientWidth; 
   sHeight=document.body.clientHeight; 
   }
   //Specify the attributes (opacity etc.) for the background of the overlay
   var bgObj=document.createElement("div"); 
   bgObj.setAttribute('id','bgDiv'); 
   bgObj.style.position="absolute"; 
   bgObj.style.top="0"; 
   bgObj.style.background="#000"; 
   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
   bgObj.style.opacity="0.8"; 
   bgObj.style.left="0"; 
   bgObj.style.width=sWidth + "px"; 
   bgObj.style.height=sHeight + "px"; 
   bgObj.style.zIndex = "10000"; 
   bgObj.style.overflowY = "auto"; 
   document.body.appendChild(bgObj); 
   //Create the Overlay Element and specify the overlay attributes 
   var msgObj=document.createElement("div") 
   msgObj.setAttribute("id","msgDiv"); 
   msgObj.setAttribute("align","center"); 
   msgObj.style.background="white"; 
   msgObj.style.border="1px solid " + bordercolor; 
   msgObj.style.position = "absolute"; 
   //var objPos=(calculatePosition(msgw))*100;
   //alert(objPos);
   msgObj.style.left = "44%"; 
   msgObj.style.top = "15%"; 
   msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   msgObj.style.marginLeft = "-225px" ; 
	if(document.documentElement.scrollTop !=0){
   msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; 
   }
   else{
   msgObj.style.marginTop= -75+ document.body.scrollTop +"px";
   }
   msgObj.style.width = msgw + "px"; 
   msgObj.style.height =msgh + "px"; 
   msgObj.style.textAlign = "center"; 
   msgObj.style.lineHeight ="25px"; 
   msgObj.style.zIndex = "10001"; 
   //Create the Overlay Title and specify the  attributes
   var title=document.createElement("h4"); 
   title.setAttribute("id","msgTitle"); 
   title.style.margin="0"; 
   title.style.padding="3px"; 
   title.style.background=bordercolor; 
   title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);"; 
   title.style.opacity="0.75"; 
   title.style.border="1px solid " + bordercolor; 
   title.style.height="18px"; 
   title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif"; 
   title.style.fontWeight="Bold"; 
   title.style.color="#404040"; 
   title.style.cursor="pointer"; 
   title.innerHTML="<table width='100%'><tr><td align='left'><div align='left'>Tell A Friend</div></td><td align='right'>Close</td></tr></table>"; 
   //Function for the actions to be done when the overlay is closed
   title.onclick=function(){ 
          document.body.removeChild(bgObj); 
          document.getElementById("msgDiv").removeChild(title); 
          document.body.removeChild(msgObj); 
		 if(document.getElementById("getdirections")){
   document.getElementById("getdirections").style.visibility='visible';	
   }
	 //if(document.getElementById("Field111")){
 //document.getElementById("fo3li106").style.visibility='visible';	
 //}
        } 
	//Load the required contents into the overlay	
   document.body.appendChild(msgObj); 
   document.getElementById("msgDiv").appendChild(title); 
   var txt=document.createElement("p"); 
   txt.style.margin="1em 0" 
   txt.setAttribute("id","msgTxt"); 
   txt.innerHTML=str; 
   document.getElementById("msgDiv").appendChild(txt); 
} 
/*----------------------------------------------------------------------------------
//Function Name: (Javascript Proptotype)
//Purpose: Function to trim the blank spaces from a string
//Created Date: 23-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/


	String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
	}
/*----------------------------------------------------------------------------------
//Function Name: initialize
//Purpose: Function to initialize the google map
//Created Date: 09-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(42.3444, -71.0416), 15);
        map.setUIToDefault();
		//map.removeMapType(G_HYBRID_MAP);
		 var blueIcon = new GIcon(G_DEFAULT_ICON);
		blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/blue/blank.png";	
		// Setup Marker options
	  function createMarker(latlng) {
      var marker = new GMarker(latlng);
	  // Specify the event and HTML for the Information window
      GEvent.addListener(marker,"click", function() {
        var myHtml = "<table><tr><td colspan=2 align='center'><B>The Baker Committee </B></td></tr><tr height='15px'><td></td><td rowspan=6><img height='150px' width ='250px' src='images/contact_image.gif'/></td></tr><tr height='15px'><td></td></tr><tr height='15px'><td>70 Fargo St. Suite 202 <br/>Boston, MA 02210<br/>617-423-2010</td></tr><tr height='15px'><td></td></tr><tr height='15px'><td></td></tr><tr height='15px'><td></td></tr><tr><td><a href='http://maps.google.com/maps/place?cid=4096562049743496062&q=70+Fargo+St,+Boston,+Suffolk,+Massachusetts+02210&hl=en&cad=src:ppiwlink&ei=QVPxSsrcKZSqvAO0n9iuAg' target='new'>More Info</a></td></tr></table>"
        map.openInfoWindowHtml(latlng, myHtml);
      });
      return marker;
		}
// Set up  GMarkerOptions object and place  the marker at the center of the map
markerOptions = { icon:blueIcon };
		var point = new GLatLng(42.3444, -71.0416);
		map.addOverlay(createMarker(point));
      }
    }
/*----------------------------------------------------------------------------------
//Function Name: getDirections
//Purpose: Funtion to get Directions from an address
//Created Date: 09-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

	function getDirections(){
	//Trim the address 
	var input=new String(document.getElementById('fromaddr').value);
	input = input.trim();
	var map = new GMap2(document.getElementById("map_canvas"));
	map.setUIToDefault();
	//map.removeMapType(G_HYBRID_MAP);
	var directions;
	var directionsPanel;
	//Create the Google Direction object 
	document.getElementById("directions_walk").innerHTML=""; //By Walk requires a destination DIV
	directions = new GDirections(map,document.getElementById("directions_walk"));
	//Event listener for errors in fetching directions
	GEvent.addListener(directions, "error", handleErrors);
	if (input !=""){
	//Get the transit mode
	var transit_mode = document.getElementById('transit_mode');
	var transit_index=transit_mode.selectedIndex;
	//Populate "From" Address from Input
	document.getElementById('fromaddr').value = input;
	var from= "from : "+input;
	var to = " to : 70 Fargo St, Boston, Suffolk, Massachusetts 02210";
	//Load Directions based on From Address and Transit Mode
	if (transit_index ==1){
	directions.load(from+to,{travelMode:G_TRAVEL_MODE_WALKING});
	}
	if (transit_index ==0){
	directions.load(from+to,{travelMode:G_TRAVEL_MODE_DRIVING});
	}
	}	
	//Handle errors if GMap is unable to find the address
	function handleErrors(){
 if (directions.getStatus().code == G_GEO_UNKNOWN_ADDRESS){
   alert("Google Maps could not find the exact location specified because the address was not detailed enough or it was invalid. Please provide a more detailed or a valid address");
   initialize();
   }
   }
   //If the From Address is null, no directions should be displayed
	if ((input =="")){
	document.getElementById('fromaddr').value = input;
	initialize();
	}
	//After the directions are loaded, re-point the marker and Information window
	var blueIcon = new GIcon(G_DEFAULT_ICON);
		blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/blue/blank.png";
	markerOptions = { icon:blueIcon };
		var point = new GLatLng(42.3444, -71.0416);
		map.addOverlay(createMarker(point));
	 function createMarker(latlng) {
      var marker = new GMarker(latlng);
      GEvent.addListener(marker,"click", function() {
        var myHtml = "<table><tr><td colspan=2 align='center'><B>The Baker Committee </B></td></tr><tr height='15px'><td></td><td rowspan=6><img height='150px' width ='250px' src='images/contact_image.gif'/></td></tr><tr height='15px'><td></td></tr><tr height='15px'><td>70 Fargo St. Suite 202 <br/>Boston, MA 02210<br/>617-423-2010</td></tr><tr height='15px'><td></td></tr><tr height='15px'><td></td></tr><tr height='15px'><td></td></tr><tr><td><a href='http://maps.google.com/maps/place?cid=4096562049743496062&q=70+Fargo+St,+Boston,+Suffolk,+Massachusetts+02210&hl=en&cad=src:ppiwlink&ei=QVPxSsrcKZSqvAO0n9iuAg' target='new'>More Info</a></td></tr></table>"
        map.openInfoWindowHtml(latlng, myHtml);
      });
      return marker;
		}
	}
/*----------------------------------------------------------------------------------
//Function Name: overlayContactQuestions
//Purpose: Function to display the overlay for Questions
//Created Date: 19-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/


	function overlayContactQuestions(){ 	 
	 //Hide the Directions Panel - To hide the dropdown when the overlay is loaded.
	 if(document.getElementById("getdirections")){
	 document.getElementById("getdirections").style.visibility='hidden';
	 }
	   //Iframe for the Questions form
	   var str = '<iframe height="620px" width="500px" allowTransparency="true" frameborder="0" scrolling="no" style="border:none"  src="https://bakerforgov.wufoo.com/embed/z7x2p1/"><a href="https://bakerforgov.wufoo.com/forms/z7x2p1/" title="Questions for Charlie" rel="nofollow">Fill out my Wufoo form!</a></iframe>';	
	   
	   var msgw,msgh,bordercolor; 
	   msgw=600;//Width
	   msgh=700;//Height 
	   titleheight=25 //title Height
	   bordercolor="#DEDEDE";//boder color
	   titlecolor="#99CCFF";//title color
	   //Get the actual body height / width to set the width of the overlay background
	   var sWidth,sHeight; 
	   if (typeof(document.body.offsetWidth) == 'number'){
	   sWidth=document.body.offsetWidth; 
	   sHeight=document.body.offsetHeight; 
	   }
	   if (typeof(document.body.clientHeight) == 'number'){
	   sWidth=document.body.clientWidth; 
	   sHeight=document.body.clientHeight; 
	   }
	   //Specify the attributes (opacity etc.) for the background of the overlay
	   var bgObj=document.createElement("div"); 
	   bgObj.setAttribute('id','bgDiv'); 
	   bgObj.style.position="absolute"; 
	   bgObj.style.top="0"; 
	   bgObj.style.background="#000"; 
	   bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75"; 
	   bgObj.style.opacity="0.8"; 
	   bgObj.style.left="0"; 
	   bgObj.style.width=sWidth + "px"; 
	   bgObj.style.height=sHeight + "px"; 
	   bgObj.style.zIndex = "10000"; 
	   bgObj.style.overflowY = "auto"; 
	   document.body.appendChild(bgObj); 
	   //Create the Overlay Element and specify the overlay attributes
	   var msgObj=document.createElement("div") 
	   msgObj.setAttribute("id","msgDiv"); 
	   msgObj.setAttribute("align","center"); 
	   msgObj.style.background="white"; 
	   msgObj.style.border="1px solid " + bordercolor; 
	   msgObj.style.position = "absolute"; 
	   msgObj.style.left = "43%"; 
	   msgObj.style.top = "20%"; 
	   msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif"; 
	   msgObj.style.marginLeft = "-225px" ; 
	    if(document.documentElement.scrollTop !=0){
	   msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px"; 
	   }
	   else{
	   msgObj.style.marginTop= -75+ document.body.scrollTop +"px";
	   }
	   msgObj.style.width = msgw + "px"; 
	   msgObj.style.height =msgh + "px"; 
	   msgObj.style.textAlign = "center"; 
	   msgObj.style.lineHeight ="25px"; 
	   msgObj.style.zIndex = "10001"; 
	   //Create the Overlay Title and specify the  attributes
	   var title=document.createElement("h4"); 
	   title.setAttribute("id","msgTitle"); 
	   title.style.margin="0"; 
	   title.style.padding="3px"; 
	   title.style.background=bordercolor; 
	   title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);"; 
	   title.style.opacity="0.75"; 
	   title.style.border="1px solid " + bordercolor; 
	   title.style.height="18px"; 
	   title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif"; 
	   title.style.fontWeight="Bold"; 
	   title.style.color="#404040"; 
	   title.style.cursor="pointer"; 
	   title.innerHTML="<table width='100%'><tr><td align='left'><div align='left'>Question for Charlie?</div></td><td align='right'>Close</td></tr></table>"; 
	   //Function for the actions to be done when the overlay is closed
	   title.onclick=function(){ 
	          document.body.removeChild(bgObj); 
	          document.getElementById("msgDiv").removeChild(title); 
	          document.body.removeChild(msgObj); 
			   if(document.getElementById("getdirections")){
			  document.getElementById("getdirections").style.visibility='visible';
			  }
	        } 
	   //Load the required contents into the overlay
	   document.body.appendChild(msgObj); 
	   document.getElementById("msgDiv").appendChild(title); 
	   var txt=document.createElement("p"); 
	   txt.style.margin="1em 0" 
	   txt.setAttribute("id","msgTxt"); 
	   txt.innerHTML=str; 
	   document.getElementById("msgDiv").appendChild(txt); 	 
	} 
/*----------------------------------------------------------------------------------
//Function Name: flashPutHref
//Purpose: For Flash Contents
//Created Date: 01-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/
/*
function flashPutHref(href) { location.href = href; }
			// SWFObject embed - These  javascript methods to be used fo r the flash conents
			var flashvars = {
				paramXMLPath: "param.xml",
				initialURL: escape(document.location)
			}
			var params = { 
				base: ".",
				bgcolor: "#1A1A1A",
				allowfullscreen: "true",
				wmode: "opaque"
			}                
			var attributes = {}
			swfobject.embedSWF("slideshowpro.swf", "flashcontent", "630", "470", "9.0.0", false, flashvars, params, attributes);  
*/
/*----------------------------------------------------------------------------------
//Function Name: removeHTMLTags
//Purpose: Function To remove HTML Tags from a string. Used to control the feed section output.
//Created Date: 17-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/

	function removeHTMLTags(htmlString){
        if(htmlString){
          var mydiv = document.createElement("div");
           mydiv.innerHTML = htmlString;
 
            if (document.all) // IE Stuff
            {
                return mydiv.innerText;
               
            }   
            else // Mozilla does not work with innerText
            {
                return mydiv.textContent;
            }                           
      }
   } 

/*----------------------------------------------------------------------------------
//Function Name: resizeIframeToFitContentBlog
//Purpose: Function To resize the Iframe in Blog Page
//Created Date: 17-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/   
function resizeIframeToFitContentBlog(iframe) {
		scroll(0,0);
			// This function resizes an IFrame object to fit its content.		
	if(typeof(window.frames[0].document.body.scrollHeight) == 'number'){	
	iframe.height = window.frames[0].document.body.scrollHeight +100;
	}
	if (typeof(window.frames[0].document.body.offsetHeight) == 'number'){
		iframe.height = window.frames[0].document.body.offsetHeight + 100; 
   }
   if (typeof(window.frames[0].document.body.clientHeight) == 'number'){
   iframe.height = window.frames[0].document.body.clientHeight +100; 
   }								
			var sidebar =  window.frames[0].document.getElementById('menu');
			//alert(sidebar.getElementsByTagName('ul')[0].clientHeight);
			//alert(sidebar.clientHeight);
			if(sidebar){
			sidebar.getElementsByTagName('ul')[0].style.Height = 700;
			//alert(sidebar.getElementsByTagName('ul')[0].style.Height);
			//alert(iframe.height);
			if (iframe.height < sidebar.getElementsByTagName('ul')[0].style.Height){
			iframe.height = sidebar.getElementsByTagName('ul')[0].style.Height;
			}
			}			
			//alert(iframe.height);
			//iframe.width = window.frames[0]
						//	.document.body.scrollWidth;
			iframe.width = 930;			
							}


/*----------------------------------------------------------------------------------
//Function Name: resizeIframeToFitContentConversations
//Purpose: Function To resize the Iframe in Conversations Page
//Created Date: 17-Nov-09
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/   
							
function resizeIframeToFitContentConversations(iframe) {
			// This function resizes an IFrame object
			// to fit its content.
			// The IFrame tag must have a unique ID attribute.
			
			iframe.height = window.frames[0]
							.document.body.scrollHeight - 10; 
				
							}
							
							
							
/*----------------------------------------------------------------------------------
//Function Name: resizeIframeToFitContent
//Purpose: Function To resize the Iframe in the news pages -Press Releases, Charlie in news, Latest Videos
//Created Date: 14-May-10
//Modification History:
//	Date		Modification Details
//	
//
/*----------------------------------------------------------------------------------*/ 							
							

function resizeIframeToFit(iframe) {
	scroll(0,0);
	
			// This function resizes an IFrame object to fit its content.	
	var browser = navigator.appName;
		if( browser == 'Microsoft Internet Explorer') {			
			if(typeof(window.frames[0].document.body.scrollHeight) == 'number'){	
				iframe.height = window.frames[0].document.body.scrollHeight +50; //100
			}
			if (typeof(window.frames[0].document.body.offsetHeight) == 'number'){
				iframe.height = window.frames[0].document.body.offsetHeight + 50; //100
			}
		   if (typeof(window.frames[0].document.body.clientHeight) == 'number'){
		   iframe.height = window.frames[0].document.body.clientHeight +50; //100
			}								
			var sidebar =  document.getElementById('connectpanel');
			//alert(sidebar.getElementsByTagName('ul')[0].clientHeight);
			//alert(sidebar.clientHeight);
			if(sidebar){
				sidebar.getElementsByTagName('tr')[0].style.Height = 700;
				//alert(sidebar.getElementsByTagName('ul')[0].style.Height);
				//alert(iframe.height);
				if (iframe.height < sidebar.getElementsByTagName('tr')[0].style.Height){
					iframe.height = sidebar.getElementsByTagName('tr')[0].style.Height;
					//alert(iframe.height);
				}
			}	
		}
		else {
			//alert("here");
				// This function resizes an IFrame object to fit its content.		
				iframe.height =0;
			if(typeof(window.frames[0].document.body.scrollHeight) == 'number'){	
				iframe.height = window.frames[0].document.body.scrollHeight +35; //100
			}
			if (typeof(window.frames[0].document.body.offsetHeight) == 'number'){
				iframe.height = window.frames[0].document.body.offsetHeight + 35; //100
			}
			if (typeof(window.frames[0].document.body.clientHeight) == 'number'){
			   iframe.height = window.frames[0].document.body.clientHeight +35; //100
			}
			//alert(iframe.height);
			document.getElementById('contain')=iframe.height;
			var sidebar =  document.getElementById('connectpanel');
			//alert(sidebar.getElementsByTagName('ul')[0].clientHeight);
			//alert(sidebar.clientHeight);
			if(sidebar){
				sidebar.getElementsByTagName('tr')[0].style.Height = 500;
				//alert(sidebar.getElementsByTagName('ul')[0].style.Height);
				//alert(iframe.height);
				if (iframe.height < sidebar.getElementsByTagName('tr')[0].style.Height){
					iframe.height = sidebar.getElementsByTagName('tr')[0].style.Height;
					//alert(iframe.height);
				}
			}
		
		}	
		 
 }	
