if (parent.frames.length>=1) 
{
window.top.location.href=document.location;
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function addbookmark() {
var bookmarkurl="http://www.musical.com/88-freizeit-urlaub/index.html" 
var bookmarktitle="URLAUB & FREIZEIT mit HEIDPARK" 
var identstring = navigator.userAgent;
var IE5 = 0; var IE6 = 0; var NS4 = 0; var OP = 0; var MOZ = 0;

if(identstring.indexOf("Opera",0) != -1) {
OP = 1; 
newWindow = window.open("","newWindow","width=500,height=130,scrollbars=no");
newWindow.document.open();
newWindow.document.write('<html><title>Heidpark zu den Favoriten hinzufügen</title><body bgcolor="#000000" onBlur="self.close()">');
newWindow.document.write('<font face="Verdana" size="2" color="#CCCCCC">');
newWindow.document.write('<b>Um Heidpark zu Ihren Favoriten hinzu zufügen, schließen Sie bitte dieses kleine Fenster und drücken anschließend die Tasten "STRG" und "T" gleichzeitig.</b><br><br>');
newWindow.document.write('<div align="center"><img src="http://root.heidpark.com/content/bookmark/musicals.gif" alt="Musicals.de" border="0"></div>');
newWindow.document.write('</font></body></html>');
newWindow.document.close();
newWindow.focus();
}

else if(identstring.indexOf("MSIE 5.",0) != -1) {
IE5 = 1;
window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

else if(identstring.indexOf("MSIE 6.",0) != -1) {
IE6 = 1;
window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

else if(identstring.indexOf("MSIE 5.",0) == -1 && identstring.indexOf("Mozilla/4.",0) != -1) {
NS4 = 1;
newWindow = window.open("","newWindow","width=500,height=130,scrollbars=no");
newWindow.document.open();
newWindow.document.write('<html><title>Heidpark zu den Favoriten hinzufügen</title><body bgcolor="#000000" onBlur="self.close()">');
newWindow.document.write('<font face="Verdana" size="2" color="#CCCCCC">');
newWindow.document.write('<b>Um Heidpark zu Ihren Favoriten hinzu zufügen, schließen Sie bitte dieses kleine Fenster und drücken anschließend die Tasten "STRG" und "D" gleichzeitig.</b><br><br>');
newWindow.document.write('<div align="center"><img src="http://root.heidpark.com/content/bookmark/musicals.gif" alt="Musicals.de" border="0"></div>');
newWindow.document.write('</font></body></html>');
newWindow.document.close();
newWindow.focus();
}

else {
MOZ = 1;
newWindow = window.open("","newWindow","width=500,height=130,scrollbars=no");
newWindow.document.open();
newWindow.document.write('<html><title>Heidpark zu den Favoriten hinzufügen</title><body bgcolor="#000000" onBlur="self.close()">');
newWindow.document.write('<font face="Verdana" size="2" color="#CCCCCC">');
newWindow.document.write('<b>Um Heidpark zu Ihren Favoriten hinzu zufügen, schließen Sie bitte dieses kleine Fenster und drücken anschließend die Tasten "STRG" und "D" gleichzeitig.</b><br><br>');
newWindow.document.write('<div align="center"><img src="http://root.heidpark.com/content/bookmark/musicals.gif" alt="Musicals.de" border="0"></div>');
newWindow.document.write('</font></body></html>');
newWindow.document.close();
newWindow.focus();
}
}

/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
/*LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;*/
LeftPosition = 340;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('Bitte ergänzen Sie folgende Angaben:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}

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


//DHTML Window script- Copyright Dynamic Drive (http://www.dynamicdrive.com)
//For full source code, documentation, and terms of usage,
//Visit http://www.dynamicdrive.com/dynamicindex9/dhtmlwindow.htm

var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}

function loadwindow(url,width,height){
if (!ie5&&!ns6)
window.open(url,"","width=width,height=height,scrollbars=1")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left="30px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
document.getElementById("cframe").src=url
}
}

function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}

function closeit(){
document.getElementById("dwindow").style.display="none"
}

function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}
