function popup_message()
{
	url = 'http://www.roogle.de/message.htm';
  window.open(url,'feedback','width=540,height=480,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');
}

function popup_news()
{
  url = 'http://www.roogle.de/morenews.htm';
  window.open(url,'nachrichten','width=500,height=500,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');
}

function popup_impressum()
{
  url = 'http://www.roogle.de/impressum.htm';
  window.open(url,'impressum','width=200,height=180,scrollbars=no,status=no,toolbar=no,menubar=no,location=no');
}

function popup_audio()
{
   url = 'http://www.roogle.de/audio.htm';
   window.open(url,'audio','width=300,height=110,scrollbars=no,status=no,toolbar=no,menubar=no,location=no,resizable=no');
}

function popup_play()
{
  url = 'http://www.roogle.de/play.htm';
  window.open(url,'play','width=320,height=420,scrollbars=no,status=no,toolbar=no,menubar=no,location=no,resizable=no');
}

function popup_poll()
{
  url = 'http://www.roogle.de/poll.php';
  window.open(url,'poll','width=240,height=460,scrollbars=no,status=no,toolbar=no,menubar=no,location=no,resizable=no');
}

function popup_sms()
{
  url = 'http://www.roogle.de/sms.php';
  window.open(url,'sms','width=320,height=420,scrollbars=no,status=no,toolbar=no,menubar=no,location=no,resizable=no');
}

wmtt = null;
document.onmousemove = updateWMTT;

function updateWMTT(e) {

	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (wmtt != null) {
		wmtt.style.left = (x + 20) + "px";
		wmtt.style.top 	= (y + 20) + "px";
	}
}

function showWMTT(id) {
	wmtt = document.getElementById(id);
	wmtt.style.display = "block"
}

function hideWMTT() {
	wmtt.style.display = "none";
}

function toggleswitch(div)
{
var option=['such','mail','auskunft','news','do', 'rss_manual'];
for(var i=0; i<option.length; i++)
{ obj=document.getElementById(option[i]);
obj.style.display=(option[i]==div)? "block" : "none"; }
}

function smswindow () {
  smsfenster=window.open("","lh-pprg-sms","width=400,height=350,resizable=no,scrollbars=no,toolbar=no,menubar=no");
  smsfenster.focus();
  return true;
}


function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}

function CheckLen() {
anzahlzeichen = 120;
StrLen = document.sms_form.message.value.length;
CharsLeft = anzahlzeichen - StrLen;
  if (CharsLeft<0){
    document.sms_form.message.value = document.sms_form.message.value.substring(0,anzahlzeichen);
    CharsLeft = 0;
 }
  document.getElementById("zeichen").innerHTML = CharsLeft;
}

function CheckLen2() {
anzahlzeichen = 140;
StrLen = document.sms_form.message.value.length;
CharsLeft = anzahlzeichen - StrLen;
  if (CharsLeft<0){
    document.sms_form.message.value = document.sms_form.message.value.substring(0,anzahlzeichen);
    CharsLeft = 0;
 }
  document.getElementById("zeichen").innerHTML = CharsLeft;
}


function fillrss(value) {
	if (value=="") {
		document.rssform.rss1.value = "";
		document.rssform.rss2.value = "";
	}	
	if (document.rssform.rss1.value == "") 
		document.rssform.rss1.value = value;
	else if (document.rssform.rss2.value == "")
			document.rssform.rss2.value = value;	
}
