// JavaScript Document
function browser_specific_amendments() {
	
amend_btn_text();
ie6();
amend_navigation();

	function amend_btn_text(){
	//Microsoft
	var our_clients = document.getElementById('our_clients_btn_text')
	var outsourcing = document.getElementById('outsourcing_btn_text')
	var contact_us = document.getElementById('contact_us_btn_text')
	var msBtn = "left_column_link_text_1"
	if (navigator.appName.indexOf('Microsoft')!=-1)
		{
		if(our_clients!==null)
			{
			our_clients.className = msBtn;
			}
		
		if(outsourcing!==null)
			{
			outsourcing.className = msBtn;
			}
			
		if(contact_us!==null)
			{
			contact_us.className = msBtn;
			}
		if(document.getElementById('local_offices')!==null){
			document.getElementById('local_offices').style.marginTop = '-300px';
			}
		}
	}
}

	function ie6(){
	//Amend Layout for IE6
	var content = document.getElementById('content')
	if(navigator.appVersion.indexOf('MSIE 6')!=-1)
		{
		if(content!==null)
			{
			//content.style.width="635px";
			content.style.overflow = 'hidden';
			change_arrows();
			change_map();
			change_map_zoom();
			
				function change_map(){
					if(document.getElementById('map')!==null){
					var map=document.getElementById('map').style
					map.position='absolute';
					map.marginLeft='-225px';
					map.backgroundImage='url(/images/map.jpg)';
					return
					}
					else{
					return
					}
				}
			
				function change_arrows(){
					var h2 = document.getElementsByTagName('h2');
					if(h2)
					for(var i = 0, e = h2[0], n = h2.length; i < n; e = h2[++i])
					e.className='arrows_ie6';
					return
				}
				
				function change_map_zoom(){
					var zoomMap=document.getElementById('zoom_container')
					if(zoomMap!==null)
					{
						zoomMap.className='zoom_map_ie6';
						return
					}
				}
			}
		}
	}
	
	function amend_navigation(){
		if(navigator.userAgent.indexOf('Safari')!=-1)
		{
		document.getElementById('home_btn').style.paddingLeft='3px';
		document.getElementById('home_btn').style.paddingRight='2px';
		}
		if(navigator.userAgent.indexOf('Opera')!=-1)
		{
		document.getElementById('home_btn').style.paddingLeft='0px';
		document.getElementById('home_btn').style.paddingRight='0px';
		document.getElementById('who_use_us_header').className='header_link_up_opera';
		document.getElementById('why_use_outsourcing_header').className='header_link_up_opera';
		document.getElementById('what_we_do_header').className='header_link_up_opera';
		document.getElementById('what_it_costs_header').className='header_link_up_opera';
		document.getElementById('who_are_we_header').className='header_link_up_opera';
		document.getElementById('how_to_make_contact_header').className='header_link_up_opera';
		}
	}
	
function page(pageName){
var header_link = pageName + '_header'
var footer_link = pageName + '_footer'

if (pageName == ''||document.getElementById(header_link)==null || document.getElementById(footer_link)==null){return false}
if (pageName=='site_map'){
document.getElementById(footer_link).style.color = '#FF0000';
document.getElementById(footer_link).style.textDecoration = 'underline';	
}
else{
document.getElementById(header_link).className = 'header_link_down';
document.getElementById(footer_link).style.color = '#FF0000';
document.getElementById(footer_link).style.textDecoration = 'underline';
}
//document.getElementById(footer_link).style.fontSize = '16px';

}

function input_focus(id){
var myInput = document.getElementById(id).value
document.getElementById(id).style.borderColor='#990000';
if(myInput=='0'){document.getElementById(id).value=''};	
}

function input_blur(id){
var myInput = document.getElementById(id).value
document.getElementById(id).style.borderColor='#cccccc';
if(myInput==''){document.getElementById(id).value='0'};
if(myInput>999){document.getElementById(id).value='999+'};
}

function zoom(mapNo){
//window.scroll(0,0);
var w=(screen.width-400)/2;
var h=(screen.height-300)/2;

if(document.getElementById('zoom_container')!==null)
	{
		document.getElementById('zoom_container').style.display='none';
	}
if(document.getElementById('zoom_container').style.display == 'none')
	{
		document.getElementById('zoom_container').style.display = 'block';
		document.getElementById('zoom_container').style.position = 'absolute';
		document.getElementById('zoom_image_1').style.display = 'none';
		document.getElementById('zoom_image_2').style.display = 'none';
		document.getElementById('zoom_image_3').style.display = 'none';
		document.getElementById('zoom_image_' + mapNo).style.display = 'block';
	}
}

function zoomIn(){
	if(document.getElementById('zoom_image_1').style.display == 'block')
		{
		document.getElementById('zoom_image_1').style.display = 'none';
		document.getElementById('zoom_image_2').style.display = 'block';
		document.getElementById('zoom_image_3').style.display = 'none';
		return
		}
	if(document.getElementById('zoom_image_2').style.display == 'block')
		{
		document.getElementById('zoom_image_1').style.display = 'none';
		document.getElementById('zoom_image_2').style.display = 'none';
		document.getElementById('zoom_image_3').style.display = 'block';
		return
		}
	if(document.getElementById('zoom_image_3').style.display == 'block')
		{
		document.getElementById('zoom_image_1').style.display = 'none';
		document.getElementById('zoom_image_2').style.display = 'none';
		document.getElementById('zoom_image_3').style.display = 'block';
		return
		}
}

function zoomOut(){
	if(document.getElementById('zoom_image_1').style.display == 'block')
		{
		return
		}
	if(document.getElementById('zoom_image_2').style.display == 'block')
		{
		document.getElementById('zoom_image_2').style.display = 'none';
		document.getElementById('zoom_image_1').style.display = 'block';
		return
		}
	if(document.getElementById('zoom_image_3').style.display == 'block')
		{
		document.getElementById('zoom_image_3').style.display = 'none';
		document.getElementById('zoom_image_2').style.display = 'block';
		return
		}
	
}

function close_map(){
document.getElementById('zoom_container').style.display='none';	
}


function ie6_over(btn){
	if(navigator.appVersion.indexOf('MSIE 6')!=-1)
	{
		document.getElementById(btn + "_btn").style.color='#FF0000';
		document.getElementById(btn + "_btn").style.borderColor='#FF0000';
	}
}
function ie6_out(btn){
	if(navigator.appVersion.indexOf('MSIE 6')!=-1)
	{
		document.getElementById(btn + "_btn").style.color='#000000';
		document.getElementById(btn + "_btn").style.borderColor='#cccccc';
	}
}