// Common Scripts Used On All Pages //
// Version V1.0.0, 03/12/2007 WBM. //
// Copyright 2007. Property of Corporate Mergers //
// Produced by Design Atom - www.designatom.com //

// Status Bar Message
function fctStatusBar(strMessage){
	window.status = strMessage;
	return true;
}

// Pad Side Menus when Page is too long
function fctPadSides(){
	// Get the actual heights of the content areas
	var intContentMain = document.getElementById('contentmain').offsetHeight;
	var intContentLeft = document.getElementById('contentleft').offsetHeight;
	var intContentRight = document.getElementById('contentright').offsetHeight;
	var intContentLower = document.getElementById('contentlower').offsetHeight;
	
	// Check if the Left side is shorter than the Middle and Lower Content
	intDiff = (intContentMain + intContentLower) - intContentLeft
	if (intDiff > 0) {
		// Pad the Left to the same length
		var intLeftHeight = intContentMain + intContentLower;
		document.getElementById('contentleft').style.height = intLeftHeight + 'px';
		
		// Position elements in left content container
		fctLeftContent(intDiff);
	}
	
	// Check if the Right side is shorter than the middle
	if (intContentRight < intContentMain) {
		// Pad the Right to the same length
		document.getElementById('contentright').style.height = intContentMain + 'px';
	}
	
	// Check if the middle is shorter than the right side
	if (intContentMain < intContentRight) {
		// Pad the Right to the same length
		document.getElementById('contentmain').style.height = intContentRight + 'px';
	}
}

// Position elements in left content container
function fctLeftContent(intDiff) { 
	// Position the picture element to the bottom of the column
	// document.getElementById('photo').style.top = intDiff + 'px';
}


// Add this Website to the Users Favourites
function fctFavourites() { 
	// Set defaults
	var strTarget = "http://www.mycontent.co.uk/pipconsultancy/"; 
	var strTitle = "Corporate Mergers."; 
	
	// Check if users browser allows this facility
	if (window.external) { 
		window.external.AddFavorite(strTarget,strTitle) 
	} 
	else { 
		alert("Sorry! Your browser doesn't\nsupport this function."); 
	} 
} 

