var isLoaded = false;

function nav_image_swap(in_name,in_state) {
	if (!isLoaded) {
		return true;
	}
	document.images[in_name].src = eval(in_name + "_" + in_state + ".src");
}

function image_swap(in_object,in_name,in_state) {
	if (!isLoaded) {
		return true;
	}
	document.images[in_object].src = eval(in_name + "_" + in_state + ".src");
}

function nav_image(in_object,in_name,in_state) {
	if (!isLoaded) {
		return true;
	}
	in_object.src = eval(in_name + "_" + in_state + ".src");
}

function change_background(in_object_name, in_value) { 
	if (!isLoaded) {
		return true;
	}
	document.getElementById(in_object_name).style.background = "transparent url(" + in_value + ") no-repeat left top";
}

function isMacIE5() {
	ie5 = (document.all)? true:false;
	macos = navigator.appVersion.indexOf("Macintosh") != -1;
	
	return (ie5 && macos);
}

function isIE() {
	ie = (document.all)? true:false;
	
	return (ie);
}

function isMacFirefox() {
	macos = navigator.appVersion.indexOf("Macintosh") != -1;
	firefox = navigator.userAgent.indexOf("Firefox") != -1;

	return (firefox && macos);
}

function openPopup(in_uri,in_name,in_height,in_width) {
		var WinWidth = in_width;
		var WinHeight = in_height;
		var theTop=(screen.height/2)-(WinHeight/2);
		var theLeft=(screen.width/2)-(WinWidth/2);
		var features='height=' + in_height + ',width=' + WinWidth +',top='+theTop+',left='+theLeft+',toolbar=0,Location=0,Directories=0,Status=0,menubar=0,Scrollbars=0,Resizable=1';
		popupWin = window.open(in_uri,in_name,features);
}

function openWindow(in_uri) {
    newWindow = window.open(in_uri);
}

function sidebarBrowserStyle() {
	
	if(isMacFirefox()) {
		document.write('<style>');
		document.write('.sidebar-tout ul.nav li a {');
   		document.write('font-size: 11px;');
		document.write('text-decoration: none;');
		document.write('font-weight: normal;');
		document.write('line-height: 14px;');
		document.write('}');
	
		document.write('.sidebar-tout ul.nav li a:hover {');
		document.write('font-size: 11px;');
		document.write('text-decoration : none;');
		document.write('font-weight: normal;');
		document.write('line-height: 14px;');
		document.write('}');
		document.write('</style>');
	}
}

function sidebarNavBrowserStyle() {
	
	if(isMacFirefox()) {
		document.write('<style>');
		document.write('.sidebar-tout-nav ul li a {');
   		document.write('font-size: 11px;');
		document.write('text-decoration: none;');
		document.write('font-weight: normal;');
		document.write('line-height: 14px;');
		document.write('}');
	
		document.write('.sidebar-tout-nav ul li a:hover {');
		document.write('font-size: 11px;');
		document.write('text-decoration : none;');
		document.write('font-weight: normal;');
		document.write('line-height: 14px;');
		document.write('}');
		document.write('</style>');
	}
}

btn_upper_rma_status_off = new Image;
btn_upper_rma_status_off.src = js_root + "images/btn_upper_rma_status_off.gif";
btn_upper_rma_status_on = new Image;
btn_upper_rma_status_on.src = js_root + "images/btn_upper_rma_status_on.gif";

btn_upper_our_store_off = new Image;
btn_upper_our_store_off.src = js_root + "images/btn_upper_our_store_off.gif";
btn_upper_our_store_on = new Image;
btn_upper_our_store_on.src = js_root + "images/btn_upper_our_store_on.gif";

btn_upper_amos_login_off = new Image;
btn_upper_amos_login_off.src = js_root + "images/btn_upper_amos_login_off.gif";
btn_upper_amos_login_on = new Image;
btn_upper_amos_login_on.src = js_root + "images/btn_upper_amos_login_on.gif";

btn_upper_partner_login_off = new Image;
btn_upper_partner_login_off.src = js_root + "images/btn_upper_partner_login_off.gif";
btn_upper_partner_login_on = new Image;
btn_upper_partner_login_on.src = js_root + "images/btn_upper_partner_login_on.gif";

bottom_privacy_policy_off = new Image();
bottom_privacy_policy_off.src = js_root + "images/bottom_privacy_policy_off.gif";
bottom_privacy_policy_on = new Image();
bottom_privacy_policy_on.src = js_root + "images/bottom_privacy_policy_on.gif";

bottom_terms_of_service_off = new Image();
bottom_terms_of_service_off.src = js_root + "images/bottom_terms_of_service_off.gif";
bottom_terms_of_service_on = new Image();
bottom_terms_of_service_on.src = js_root + "images/bottom_terms_of_service_on.gif";

link_learn_more_off = new Image();
link_learn_more_off.src = js_root + "images/link_learn_more_off.gif";
link_learn_more_on = new Image();
link_learn_more_on.src = js_root + "images/link_learn_more_on.gif";

link_side_bar_more_details_off = new Image();
link_side_bar_more_details_off.src = js_root + "images/link_side_bar_more_details_off.gif";
link_side_bar_more_details_on = new Image();
link_side_bar_more_details_on.src = js_root + "images/link_side_bar_more_details_on.gif";

link_side_bar_all_press_mentions_articles_off = new Image();
link_side_bar_all_press_mentions_articles_off.src = js_root + "images/link_side_bar_all_press_mentions_articles_off.gif";
link_side_bar_all_press_mentions_articles_on = new Image();
link_side_bar_all_press_mentions_articles_on.src = js_root + "images/link_side_bar_all_press_mentions_articles_on.gif";

link_side_bar_all_press_releases_news_off = new Image();
link_side_bar_all_press_releases_news_off.src = js_root + "images/link_side_bar_all_press_releases_news_off.gif";
link_side_bar_all_press_releases_news_on = new Image();
link_side_bar_all_press_releases_news_on.src = js_root + "images/link_side_bar_all_press_releases_news_on.gif";

link_side_bar_find_out_more_off = new Image();
link_side_bar_find_out_more_off.src = js_root + "images/link_side_bar_find_out_more_off.gif";
link_side_bar_find_out_more_on = new Image();
link_side_bar_find_out_more_on.src = js_root + "images/link_side_bar_find_out_more_on.gif";

link_side_bar_our_people_off = new Image();
link_side_bar_our_people_off.src = js_root + "images/link_side_bar_our_people_off.gif";
link_side_bar_our_people_on = new Image();
link_side_bar_our_people_on.src = js_root + "images/link_side_bar_our_people_on.gif";

link_side_bar_our_expertise_off = new Image();
link_side_bar_our_expertise_off.src = js_root + "images/link_side_bar_our_expertise_off.gif";
link_side_bar_our_expertise_on = new Image();
link_side_bar_our_expertise_on.src = js_root + "images/link_side_bar_our_expertise_on.gif";

link_side_bar_our_experience_off = new Image();
link_side_bar_our_experience_off.src = js_root + "images/link_side_bar_our_experience_off.gif";
link_side_bar_our_experience_on = new Image();
link_side_bar_our_experience_on.src = js_root + "images/link_side_bar_our_experience_on.gif";

link_side_bar_our_philosophy_off = new Image();
link_side_bar_our_philosophy_off.src = js_root + "images/link_side_bar_our_philosophy_off.gif";
link_side_bar_our_philosophy_on = new Image();
link_side_bar_our_philosophy_on.src = js_root + "images/link_side_bar_our_philosophy_on.gif";

bg_contact_information_box_off = new Image();
bg_contact_information_box_off.src = js_root + "images/bg_contact_information_box_off.gif";
bg_contact_information_box_on = new Image();
bg_contact_information_box_on.src = js_root + "images/bg_contact_information_box_on.gif";

link_more_details_off = new Image();
link_more_details_off.src = js_root + "images/link_more_details_off.gif";
link_more_details_on = new Image();
link_more_details_on.src = js_root + "images/link_more_details_on.gif";

link_submit_your_resume_off = new Image();
link_submit_your_resume_off.src = js_root + "images/link_submit_your_resume_off.gif";
link_submit_your_resume_on = new Image();
link_submit_your_resume_on.src = js_root + "images/link_submit_your_resume_on.gif";

link_side_bar_light_more_details_off = new Image();
link_side_bar_light_more_details_off.src = js_root + "images/link_side_bar_light_more_details_off.gif";
link_side_bar_light_more_details_on = new Image();
link_side_bar_light_more_details_on.src = js_root + "images/link_side_bar_light_more_details_on.gif";

btn_apply_now_off = new Image();
btn_apply_now_off.src = js_root + "images/btn_apply_now_off.gif";
btn_apply_now_on = new Image();
btn_apply_now_on.src = js_root + "images/btn_apply_now_on.gif";

btn_send_off = new Image();
btn_send_off.src = js_root + "images/btn_send_off.gif";
btn_send_on = new Image();
btn_send_on.src = js_root + "images/btn_send_on.gif";

btn_cancel_off = new Image();
btn_cancel_off.src = js_root + "images/btn_cancel_off.gif";
btn_cancel_on = new Image();
btn_cancel_on.src = js_root + "images/btn_cancel_on.gif";

link_side_bar_light_find_out_more_off = new Image();
link_side_bar_light_find_out_more_off.src = js_root + "images/link_side_bar_light_find_out_more_off.gif";
link_side_bar_light_find_out_more_on = new Image();
link_side_bar_light_find_out_more_on.src = js_root + "images/link_side_bar_light_find_out_more_on.gif";

btn_light_blue_popup_close_off = new Image;
btn_light_blue_popup_close_off.src = js_root + "images/btn_light_blue_popup_close_off.gif";
btn_light_blue_popup_close_on = new Image;
btn_light_blue_popup_close_on.src = js_root + "images/btn_light_blue_popup_close_on.gif";

isLoaded = true;