// laing menu function
var ci_left_position;
var ci_qo_left_position;
var ci_widht;
var ci_qo_widht;
var m_ci_l_image;
var m_ci_qo_l_image;
var m_ci_r_image;
var m_ci_qo_r_image;
var timeout; 
var qo_timeout; 

function show_in_mi_content(this_data_id) {
	document.getElementById('mi_content').innerHTML = document.getElementById(this_data_id).innerHTML; 
}
function show_in_qo_mi_content(this_qo_content_data_id) {
	document.getElementById('mi_qo_content').innerHTML = document.getElementById(this_qo_content_data_id).innerHTML; 
}
function show_in_qo_selector(this_qo_selector_data_id) {
	document.getElementById('qo_selector').innerHTML = document.getElementById(this_qo_selector_data_id).innerHTML; 
	document.getElementById(this_qo_selector_data_id+'_se').focus();
}

function show_ci(element_id, speed){
	//alert(element_id);
	var timeout; 
	ci_left_position=getRelLeft(element_id); 
	ci_top_position=getRelTop(element_id);
	ci_widht=document.getElementById(element_id).offsetWidth; 
	//alert (ci_left_position +" "+ ci_top_position +" "+ ci_widht);
	if (item_position == '1'){
		m_ci_l_image = "<img src=\'images/lm_ci_l.gif\' width=\'15\' height=\'34\'>";
	}
	else {
		m_ci_l_image = "<img src=\'images/lm_ci_l.gif\' width=\'15\' height=\'34\'>";
	}
	if (item_position == 'last'){
		m_ci_r_image = "<img src=\'images/lm_ci_r.gif\' width=\'15\' height=\'34\'>";
	}
	else {
		m_ci_r_image = "<img src=\'images/lm_ci_r.gif\' width=\'15 height=\'34\'>";
	}
	timeout = setTimeout(" document.getElementById('m_ci_l_image').innerHTML = m_ci_l_image; ", speed); 
	timeout = setTimeout(" document.getElementById('m_ci_r_image').innerHTML = m_ci_r_image; ", speed);
	//alert('element_id:'+element_id+'offsetLeft: '+ci_left_position+' offsetWidth: '+ci_widht+' offsetTop: '+ci_top_position); 
	timeout = setTimeout(" document.getElementById('ci').style.visibility='visible'; ", speed); 
	timeout = setTimeout(" document.getElementById('ci_txt').innerHTML = item_name; ", speed); 
/*
	if (item_position == '1'){
		timeout = setTimeout(" document.getElementById('ci').style.left = ci_left_position-1; ", speed);
		timeout = setTimeout(" document.getElementById('ci').style.width = ci_widht+12; ", speed); 
	}
	else {
		timeout = setTimeout(" document.getElementById('ci').style.left = ci_left_position-20; ", speed);
		timeout = setTimeout(" document.getElementById('ci').style.width = ci_widht+30; ", speed); 
		timeout = setTimeout(" document.getElementById('ci').style.top = ci_top_position; ", speed);
}
*/
	timeout = setTimeout(" document.getElementById('ci').style.left = ci_left_position-15; ", speed);
	timeout = setTimeout(" document.getElementById('ci').style.width = ci_widht+30; ", speed); 
	timeout = setTimeout(" document.getElementById('ci').style.top = ci_top_position-5; ", speed);

	this_data_id = element_id+'_content';
	timeout = setTimeout(" show_in_mi_content(this_data_id); ", speed);
}


function show_ci_qo(element_id, speed){
	//alert(element_id);
	var qo_timeout; 
	ci_qo_left_position=getRelLeft(element_id); 
	ci_qo_top_position=getRelTop(element_id);
	ci_qo_widht=document.getElementById(element_id).offsetWidth; 
	//alert (ci_left_position +" "+ ci_top_position +" "+ ci_widht);
	if (qo_item_position == '1'){
		m_ci_qo_l_image = "<img src=\'images/qo_ci_l.gif\' width=\'18\' height=\'27\'>";
	}
	else {
		m_ci_qo_l_image = "<img src=\'images/qo_ci_l.gif\' width=\'18\' height=\'27\'>";
	}
	if (qo_item_position == 'last'){
		m_ci_qo_r_image = "<img src=\'images/qo_ci_r.gif\' width=\'16\' height=\'27\'>";
	}
	else {
		m_ci_qo_r_image = "<img src=\'images/qo_ci_r.gif\' width=\'16 height=\'27\'>";
	}
	qo_timeout = setTimeout(" document.getElementById('m_ci_qo_l_image').innerHTML = m_ci_qo_l_image; ", speed); 
	qo_timeout = setTimeout(" document.getElementById('m_ci_qo_r_image').innerHTML = m_ci_qo_r_image; ", speed);
	//alert('element_id:'+element_id+'offsetLeft: '+ci_left_position+' offsetWidth: '+ci_widht+' offsetTop: '+ci_top_position); 
	qo_timeout = setTimeout(" document.getElementById('ci_qo').style.visibility='visible'; ", speed); 
	qo_timeout = setTimeout(" document.getElementById('ci_qo_txt').innerHTML = qo_item_name; ", speed); 
	//alert(qo_item_name);
/*
	if (item_position == '1'){
		timeout = setTimeout(" document.getElementById('ci').style.left = ci_left_position-1; ", speed);
		timeout = setTimeout(" document.getElementById('ci').style.width = ci_widht+12; ", speed); 
	}
	else {
		timeout = setTimeout(" document.getElementById('ci').style.left = ci_left_position-20; ", speed);
		timeout = setTimeout(" document.getElementById('ci').style.width = ci_widht+30; ", speed); 
		timeout = setTimeout(" document.getElementById('ci').style.top = ci_top_position; ", speed);
}
*/
	qo_timeout = setTimeout(" document.getElementById('ci_qo').style.left = ci_qo_left_position-20; ", speed);
	qo_timeout = setTimeout(" document.getElementById('ci_qo').style.width = ci_qo_widht+40; ", speed); 
	qo_timeout = setTimeout(" document.getElementById('ci_qo').style.top = ci_qo_top_position-0; ", speed);

	this_qo_data_id = 'selector_for_'+element_id;
	//alert(this_qo_data_id);
	qo_timeout = setTimeout(" show_in_qo_selector(this_qo_data_id); ", speed);
}


// End Of laing menu function