var is_startseite = false;
var old_emotion = '';
var old_menu    = '';
var old_obj     = 0;
var show_mover_emotion = false;

function set_emotion( obj, is_submenue )
{
 if (is_startseite==true)
 {
	$(".emoPic").css("border", "0px");
	//$("#emoPic_"+obj).css("border", "2px solid #D0D0D0");
	$("#emoPic_"+obj).css("background-color", "#D0D0D0");
	$(".emoLink").css("color", "#5F5F5F");
	$("#emoLink_"+obj).css("color", "#000000");
 }
}

var time_out_cache = null;

function reset_emotion( is_submenue )
{
 show_mover_emotion = false;
 
 if (is_startseite==true)
 {
	//$(".emoPic").css("border", "0px");
	$(".emoPic").css("background-color", "#FFFFFF");
	$(".emoLink").css("color", "#5F5F5F");
 }
}

function reset_emotion_real()
{
 if (show_mover_emotion==false)
 {
  //document.getElementById('emotion_banner').src=old_emotion;
  document.getElementById('s_menu').innerHTML=old_menu;
 }
}

var cur_img_prev = 'aaaa';
var preview_time_out_cache = null;
var show_preview_img = false;

function show_img_preview( obj )
{
 if (cur_img_prev!='aaaa')
 {
  window.clearTimeout(preview_time_out_cache);
  document.getElementById('img_preview_' + cur_img_prev).style.display = "none";
 }

 cur_img_prev = obj;
 document.getElementById('img_preview_' + obj).style.display = "block";
// document.getElementById('copyr').style.display = "none";
 
 show_preview_img = true;

 var thump = document.getElementById('pr' + obj).parentNode.parentNode;
/*
 var trenn = thump.src.indexOf('?');
 
 if (trenn>0)
 {
  thump.src = thump.src.substr(0, trenn);
 } */
 
 if (thump.nodeName.toLowerCase()=='td')
 {
  thump = thump.parentNode.parentNode;  
  
  if (thump.nodeName.toLowerCase()=='tbody')
   thump = thump.parentNode;
 }
 thump.style.backgroundColor = "#E1E1E1";
 thump.style.borderColor = "#808483";

 var txt_obj = document.getElementById('main_details_table_txt');
 if (txt_obj!=null)
  txt_obj.style.display="none";
}

function hide_img_preview()
{
 window.clearTimeout(preview_time_out_cache);
 preview_time_out_cache = window.setTimeout("hide_img_preview_real()", 300);

 var thump = document.getElementById('pr' + cur_img_prev).parentNode.parentNode;
/*
 var trenn = thump.src.indexOf('?');

 if (trenn>0)
 {
  thump.src = thump.src.substr(0, trenn)+'?sgrey=80';
 } else {
  thump.src = thump.src+'?sgrey=80';
 }          
 */
 
 if (thump.nodeName.toLowerCase()=='td')
 {
  thump = thump.parentNode.parentNode;
  
  if (thump.nodeName.toLowerCase()=='tbody')
   thump = thump.parentNode;
 }

 thump.style.backgroundColor = "#FFFFFF";
 thump.style.borderColor = "#EEEEEE";
 thump.style.backgroundColor = "#EEEEEE";
 thump.style.borderColor = "#C0C0C0";

 show_preview_img = false;
}

function hide_img_preview_real()
{
 if (show_preview_img==false)
 {
  document.getElementById('img_preview_' + cur_img_prev).style.display = "none";
  document.getElementById('copyr').style.display = "block";
  var txt_obj = document.getElementById('main_details_table_txt');
  if (txt_obj!=null)
   txt_obj.style.display="block";
 }
}






var cur_img_rollover = 'aaaa';

function img_rollover( obj )
{
 cur_img_rollover = obj;

 var thump = document.getElementById('wi' + obj);
 var trenn = thump.src.indexOf('?');
 
 if (trenn>0)
 {
  thump.src = thump.src.substr(0, trenn);
 }
}

function img_rollout()
{
 var thump = document.getElementById('wi' + cur_img_rollover);
 var trenn = thump.src.indexOf('?');

 if (trenn>0)
 {
  thump.src = thump.src.substr(0, trenn)+'?grey=80';
 } else {
  thump.src = thump.src+'?grey=80';
 }
}
