if (document.images)
{
	// Start Top menu buttons.
	var search_off = new Image();
	search_off.src = "../images/buttons/search_off.gif";
	var search_on = new Image();
	search_on.src = "../images/buttons/search_on.gif";
	
	var sitemap_off = new Image();
	sitemap_off.src = "../images/buttons/sitemap_off.gif";
	var sitemap_on = new Image();
	sitemap_on.src = "../images/buttons/sitemap_on.gif";
	// End Top menu buttons. 
	
	// Login Area Buttons.
	var login_off = new Image();
	login_off.src = "../images/buttons/side_login_btn_off.gif";
	var login_on = new Image();
	login_on.src = "../images/buttons/side_login_btn_on.gif";
	
	var sign_out_off = new Image();
	sign_out_off.src = "../images/buttons/sign_out_off.gif";
	var sign_out_on = new Image();
	sign_out_on.src = "../images/buttons/sign_out_on.gif";
	
	var profile_off = new Image();
	profile_off.src = "../images/buttons/profile_off.gif";
	var profile_on = new Image();
	profile_on.src = "../images/buttons/profile_on.gif";
	
	var admin_off = new Image();
	admin_off.src = "../images/buttons/admin_off.gif";
	var admin_on = new Image();
	admin_on.src = "../images/buttons/admin_on.gif";
	// End Login Area Buttons.
	
	// Main Menu Buttons.
	var main_home_off = new Image();
	main_home_off.src = "../images/menu/main/home_off.gif";
	var main_home_on = new Image();
	main_home_on.src = "../images/menu/main/home_on.gif";
	
	var main_company_off = new Image();
	main_company_off.src = "../images/menu/main/company_off.gif";
	var main_company_on = new Image();
	main_company_on.src = "../images/menu/main/company_on.gif";
	
	var main_portfolio_off = new Image();
	main_portfolio_off.src = "../images/menu/main/portfolio_off.gif";
	var main_portfolio_on = new Image();
	main_portfolio_on.src = "../images/menu/main/portfolio_on.gif";
	
	var main_clients_off = new Image();
	main_clients_off.src = "../images/menu/main/clients_off.gif";
	var main_clients_on = new Image();
	main_clients_on.src = "../images/menu/main/clients_on.gif";
	
	var main_news_off = new Image();
	main_news_off.src = "../images/menu/main/news_off.gif";
	var main_news_on = new Image();
	main_news_on.src = "../images/menu/main/news_on.gif";
	
	var main_career_off = new Image();
	main_career_off.src = "../images/menu/main/career_off.gif";
	var main_career_on = new Image();
	main_career_on.src = "../images/menu/main/career_on.gif";
	
	var main_contact_us_off = new Image();
	main_contact_us_off.src = "../images/menu/main/contact_us_off.gif";
	var main_contact_us_on = new Image();
	main_contact_us_on.src = "../images/menu/main/contact_us_on.gif";	
	// End Main Menu Buttons.
	
	// Misc. Buttons.
	var go_off = new Image();
	go_off.src = "../images/buttons/go_off.gif";
	var go_on = new Image();
	go_on.src = "../images/buttons/go_on.gif";	
	
	var go2_off = new Image();
	go2_off.src = "../images/buttons/go2_off.gif";
	var go2_on = new Image();
	go2_on.src = "../images/buttons/go2_on.gif";	
	// End Misc. Buttons.
}

// Functions

function actNew(obj, status) {  
			
	obj = obj.children[0];
	obj.src = obj.src.replace("_up.", "_over.");
	
	if (status != '')
		window.status = status;
}

function inactNew(obj) {	
	
	obj = obj.children[0];		
	obj.src = obj.src.replace("_over.", "_up.");
	
	if (window.status != '')
			window.status = '';
}
	
		
// Mouseover code
function act(imgName, status) {
  if (document.images)    
    document[imgName].src = eval(imgName + "_on.src");   
  if (status != '')
	window.status = status;
}
function inact(imgName) {
  if (document.images)
    document[imgName].src = eval(imgName + "_off.src");
  if (window.status != '')
		window.status = '';
}

// Pops up a new window.
function popupWindow(url, name, height, width, scrollbars, resizable)	
{
	var popwin;
	var opts = "toolbar=no,status=no,location=no,menubar=no";

	if((screen.height - 75) < height) height = screen.height - 75;
	// Calculate the position of the window (centered).
	var top, left;
	left = ((screen.width - width) / 2) - 20;
	top = ((screen.height - height) / 2) - 30;
		
	opts += ",resizable=" + resizable + ",height=" + height + ",width=" + width + ",scrollbars=" + scrollbars + ",left=" + left + ",top=" + top;
	popwin = window.open("", name, opts);
	popwin.focus();
	popwin.location = url;
}


// Flash Version Detector  v1.1.5
// http://www.dithered.com/javascript/flash_detect/index.html
// code by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)
// with VBScript code from Alastair Hamilton

var flashVersion = 0;
flashVersion_DONTKNOW = -1;
function getFlashVersion() {
	var agent = navigator.userAgent.toLowerCase(); 
	
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }
   
	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
			else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
			else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
			else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
			else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
		}
	}

	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	   document.write('<scr' + 'ipt language="VBScript"\> \n');
		document.write('on error resume next \n');
		document.write('dim obFlash \n');
		document.write('set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") \n');
		document.write('if IsObject(obFlash) then \n');
		document.write('flashVersion = 7 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n');
		document.write('if flashVersion < 7 and IsObject(obFlash) then \n');
		document.write('flashVersion = 6 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n');
		document.write('if flashVersion < 6 and IsObject(obFlash) then \n');
		document.write('flashVersion = 5 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n');
		document.write('if flashVersion < 5 and IsObject(obFlash) then \n');
		document.write('flashVersion = 4 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n');
		document.write('if flashVersion < 4 and IsObject(obFlash) then \n');
		document.write('flashVersion = 3 \n');
		document.write('end if');
		document.write('</scr' + 'ipt\> \n');
  }
		
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;

	// Can't detect in all other cases
	else {
		flashVersion = flashVersion_DONTKNOW;
	}

	return flashVersion;
}

function writeActiveContent (strContent) {
	document.write(strContent);	
}

function openNew(action){

	window.open(action);
}
// End Functions