if (document.URL) {
 if ( (document.URL.substring(0,23)!='http://www.topsubmit.de') && (document.URL.substring(0,28)!='http://topsubmit.etracker.de')) {
  // document.location='http://www.topsubmit.de/';
 }
}

function open_print(id) {
  window.open("/news/print.php?id="+id, "Druckversion", "width=660,height=700,scrollbars=yes");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function callhelp(id) {
window.open("/include/sed-help/?id="+id,"Hilfe","width=400,height=400,scrollbars=yes");
}

function open_window(url,title,width,height,bars) {
 window.open (url,title,"scrollbars="+bars+",width="+width+",height="+height);
}

function nl_check() {
 if (document.nl.email.value.indexOf("@",0) == -1 ) { 
  alert("Bitte geben Sie eine gültige eMail-Adresse an!");
  document.nl.email.focus();
  return false;
 }
 return true;
}

function submit_it() {
 with (document.nl) {
  str_url = "http://www.topsubmit.de/include/cat/newsletter/?email=" + email.value + "&action=" + action[0].checked ;
  window.open (str_url, "Newsletter", "scrollbars=no,width=350,height=150");
  email.value = "";
  action[0].checked = true;
 }
}

function show_picture(url, breite, hoehe) {
 if (breite >= 600){ breite =600; }
 if (hoehe >= 500) { hoehe  =500; }
 hoehe = hoehe + 30;

 if((hoehe ==520) || (breite == 600)){
  window.open("/news/includes/bildanzeigen.php?url="+url,"bild","width="+breite+",height="+hoehe+",scrollbars=yes");
 }
 else{
  window.open("/news/includes/bildanzeigen.php?url="+url,"bild","width="+breite+",height="+hoehe+",scrollbars=no");
 }
}

function check_cookie(lookup) {
if(document.cookie) { 
 cookies = document.cookie.split("; ");
 for(i=0; i < cookies.length; ++i) { 
  contents = cookies[i].split("=");
  if(contents[0] == lookup) return contents[1];
 }
}
return false;
} 

function set_cookie(name,value,url) {
  document.cookie = name+"="+value+"; path="+url;
}

function callchat() {
  window.open("/chat_connect.php","chat","width=800,height=600,scrollbars=no");
}

function openchat(name) {
  window.open("/chat_connect.php?username="+name,"openchat","width=800,height=600,scrollbars=no");
}
