function application_actuator() {
	show_onLoad();
	img_preloader();
/*	rotation_control();*/
}
	
img_preloader();

function img_preloader() {
	imageBuffer = new Array();
	for(i=0;i<(document.images.length); i++) {
		tmp_img_src_holder = document.images[i].src + '';
		if(tmp_img_src_holder.indexOf('_out') != -1) {
			imageBuffer[imageBuffer.length] = new Image;
			imageBuffer[imageBuffer.length - 1].src = tmp_img_src_holder.replace('out', 'over');
		}
	}
}

isOPERA = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
isIE    = (document.all && !isOPERA)? true : false;
isDOM   = (document.getElementById && !isIE && !isOPERA)? true : false;


function imageSwap(f_Name) {
	i_switch = document.images[f_Name].src + '';
	if(i_switch.indexOf('out') != -1) {
		new_image = i_switch.replace('out', 'over');
	}
	else {
		new_image = i_switch.replace('over', 'out');	
	}
	document.images[f_Name].src = new_image;
}


function show_hide(f_arrow_name, f_id) {
	f_open_closed = document.images[f_arrow_name].src + '';
	if(f_open_closed.indexOf('open') != -1) {
		hide(f_id);
		f_new_arrow = f_open_closed.replace('open', 'closed');
		document.images[f_arrow_name].src=f_new_arrow;
	}
	else {
		show(f_id, 'table-row');
		f_new_arrow = f_open_closed.replace('closed', 'open');
		document.images[f_arrow_name].src=f_new_arrow;
	}
}

function underline_box(id, f_decoration) {
	if (isDOM) {
		document.getElementById(id).style.textDecoration = f_decoration;
	}
	else if (isIE) {
		document.all[id].style.textDecoration = f_decoration;
	}	
}

function hide (id) {
	if (isDOM)
		document.getElementById(id).style.display = "none";
	else if (isIE)
		document.all[id].style.display = "none";
}
if (isDOM || isIE)
{
	document.writeln('<style type="text/css">');
	document.writeln('.SubItemRow \{ display: none; \}');
	document.writeln('</style>');
}

function show (id, displayValue)
{
	if (isDOM)
		document.getElementById(id).style.display = (displayValue)? displayValue : "block";
	else if (isIE)
		document.all[id].style.display = "block";
}

function detect_ie_mac(f_toggle) {
	ok_val = 1;
	f_platform = navigator.appName + '';
	if(navigator.appVersion.indexOf("Mac") != -1) {
		if(f_platform.indexOf('Explorer') != -1) {
			f_open_closed = document.images[f_toggle].src + '';
			if(f_open_closed.indexOf('open') != -1) {
				ok_val = 0;
			}
		}
	}
	if(ok_val == 1) {
		return 1;
	}
	else {
		return 0;
	}
}

function show_onLoad() {
/*	if(detect_ie_mac('toggle2')) { 
		show_hide('toggle2', 'sub_0_2');
	}
	if(detect_ie_mac('toggle3')) { 
		show_hide('toggle3', 'sub_0_3');
	}
	if(detect_ie_mac('toggle7')) { 
		show_hide('toggle7', 'sub_0_7');
	}
	if(detect_ie_mac('toggle8')) { 
		show_hide('toggle8', 'sub_0_8');
	}
	if(detect_ie_mac('toggle17')) { 
		show_hide('toggle17', 'sub_0_17');
	}*/
/*	if(detect_ie_mac('toggle10')) { 
		show_hide('toggle10', 'sub_0_10')
	}
	if(detect_ie_mac('toggle11')) { ;
		show_hide('toggle11', 'sub_0_11');
	}*/
}