var timer;

function changeit(div_id) {
  if (document.getElementById(div_id).style.visibility == 'visible') {
    document.getElementById(div_id).style.visibility = 'hidden';
  }
  else {
    document.getElementById(div_id).style.visibility = 'visible';
  }
}


function change_onmouseover(div_id, div_id2) {
  //if (timer != '1') return;
  document.getElementById(div_id).style.display = 'block';
  document.getElementById(div_id2).style.display = 'none';
}

function change_onmouseout(div_id, div_id2) {
  document.getElementById(div_id).style.display = 'none';
  document.getElementById(div_id2).style.display = 'block';
}

function change_onclick(div_id) {
  document.getElementById(div_id).style.display = 'block';
  document.getElementById('small_box_container').style.display = 'none';
}

function clear_email() {
	email_a = document.getElementById('mail');
	email = email_a.innerHTML;
	email = email.replace(/\[at\]/, '@')
	email = email.replace(/\[dot\]/, '.')
	var length = email.length;
	var new_email = '';
	for (var i = length; i >= 0; i--) {
		if (email.charAt(i)) {
			new_email += email.charAt(i);
		}
	}
	document.getElementById('mail').innerHTML = new_email;
	document.getElementById('mail').href = 'mailto:' + new_email;
}

window.onload=function() {
  if (document.getElementById('mail')) {
    clear_email();
  }
}

/*window.onload=function(){
  setTimeout('timer=1;', 1000);
}*/


function show_info() {
  alert('Sie verlassen nun das Angebot von Worldwebware');
}


/*Resize des iframe fŸr das GŠstebuch*/

function resize_me(n){
  d=10;
 
  ifObj=document.getElementsByName(n)[0];
 
  p=(document.all)?'scroll':'offset';
 
  // w = (W3C-DOM)? Breite in px : ((IEs)? Breite in px : Breite in px sonstige Browser)
  w = (window.getComputedStyle)? window.getComputedStyle(ifObj, null).getPropertyValue('width') :
                               ((ifObj.currentStyle) ? ifObj.currentStyle['width'] : eval("window.frames[n].document.getElementsByTagName('body')[0]."+p+"Width+"+20+"+'px'"));
 
  ifObj.style.width = w;
  eval("ifObj.style.height=Math.max(200,window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d+")+'px'");
}


