 function playSound() {
  parent.popUp_venster.document.firstSound.play(); 
  }

 function stopSound() { 
 parent.popUp_venster.document.firstSound.stop(); 
 }
 
function secondFenster() {
  if ((parent.win != null) && (parent.win.closed != true)) 
    parent.win.close();  
 }
 
function popup(text,titel,breite,hoehe,bars) {
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-breite)/2, topPos = (h-hoehe)/2;

	secondFenster();
	parent.win = window.open('', 'name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + bars + ',resizable=no,width='+breite+',height='+hoehe+',screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
	parent.win.document.open("text/html");
	parent.win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><HEAD><meta http-equiv="imagetoolbar" content="yes"><TITLE>',titel,'</TITLE><META http-equiv="content-type" content="text/html;charset=windows-1251"></HEAD><body bgcolor=#ffffff topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onload="window.focus();" style="cursor:url(close.cur);">');
	parent.win.document.write('<a href="javascript:window.close()" style="cursor:url(close.cur);"><img src="',text,'" border="0" alt="Venster sluiten" style="cursor:url(close.cur);"></a><br><br>');
	parent.win.document.write('</BODY></HTML>');
	parent.win.document.close();
}
 
function popup2(text,titel,breite,hoehe,bars) {
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-breite)/2, topPos = (h-hoehe)/2;

	secondFenster();
	parent.win = window.open('', 'name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + bars + ',resizable=no,width='+breite+',height='+hoehe+',screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
	parent.win.document.open("text/html");
	parent.win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><HEAD><meta http-equiv="imagetoolbar" content="yes"><TITLE>',titel,'</TITLE><META http-equiv="content-type" content="text/html;charset=windows-1251"></HEAD><body bgcolor=#ffffff topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onload="window.focus();">');
	parent.win.document.write('<OBJECT ID="MediaPlayer1" width="' + breite + '" height="' + hoehe + '" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
	parent.win.document.write('<PARAM NAME="FileName" VALUE="img/chopper.wmv">');
	parent.win.document.write('<PARAM NAME="ShowControls" VALUE="1">');
	parent.win.document.write('<PARAM NAME="ShowPositionControls" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ShowAudioControls" VALUE="1">');
	parent.win.document.write('<PARAM NAME="ShowTracker" VALUE="1">');
	parent.win.document.write('<PARAM NAME="ShowDisplay" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ShowStatusBar" VALUE="1">');
	parent.win.document.write('<PARAM NAME="AutoSize" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ShowGotoBar" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ShowCaptioning" VALUE="0">');
	parent.win.document.write('<PARAM NAME="AutoStart" VALUE="1">');
	parent.win.document.write('<PARAM NAME="AnimationAtStart" VALUE="1">');
	parent.win.document.write('<PARAM NAME="TransparentAtStart" VALUE="0">');
	parent.win.document.write('<PARAM NAME="AllowScan" VALUE="0">');
	parent.win.document.write('<PARAM NAME="EnableContextMenu" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ClickToPlay" VALUE="0">');
	parent.win.document.write('<PARAM NAME="InvokeURLs" VALUE="0">');
	parent.win.document.write('<PARAM NAME="DefaultFrame" VALUE="datawindow">');
	parent.win.document.write('<embed src="' + text + '" width="' + breite + '" height="' + hoehe + '" autostart="false" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer1">');
	parent.win.document.write('</embed>');
	parent.win.document.write('</OBJECT>');
	parent.win.document.write('</BODY></HTML>');
	parent.win.document.close();
}


function popup3(text,titel,breite,hoehe,bars) {
var w = screen.availWidth;
var h = screen.availHeight;
var leftPos = (w-breite)/2, topPos = (h-hoehe)/2;

	secondFenster();
	parent.win = window.open('', 'name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + bars + ',resizable=no,width='+breite+',height='+hoehe+',screenx=20,screeny=20,top=' + topPos + ',left=' + leftPos);
	parent.win.document.open("text/html");
	parent.win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><HEAD><meta http-equiv="imagetoolbar" content="yes"><TITLE>',titel,'</TITLE><META http-equiv="content-type" content="text/html;charset=windows-1251"></HEAD><body bgcolor=#ffffff topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onload="window.focus();">');
	parent.win.document.write('<OBJECT ID="MediaPlayer1" width="' + breite + '" height="' + hoehe + '" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/ controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
	parent.win.document.write('<PARAM NAME="FileName" VALUE="img/chopper_2.wmv">');
	parent.win.document.write('<PARAM NAME="ShowControls" VALUE="1">');
	parent.win.document.write('<PARAM NAME="ShowPositionControls" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ShowAudioControls" VALUE="1">');
	parent.win.document.write('<PARAM NAME="ShowTracker" VALUE="1">');
	parent.win.document.write('<PARAM NAME="ShowDisplay" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ShowStatusBar" VALUE="1">');
	parent.win.document.write('<PARAM NAME="AutoSize" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ShowGotoBar" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ShowCaptioning" VALUE="0">');
	parent.win.document.write('<PARAM NAME="AutoStart" VALUE="1">');
	parent.win.document.write('<PARAM NAME="AnimationAtStart" VALUE="1">');
	parent.win.document.write('<PARAM NAME="TransparentAtStart" VALUE="0">');
	parent.win.document.write('<PARAM NAME="AllowScan" VALUE="0">');
	parent.win.document.write('<PARAM NAME="EnableContextMenu" VALUE="0">');
	parent.win.document.write('<PARAM NAME="ClickToPlay" VALUE="0">');
	parent.win.document.write('<PARAM NAME="InvokeURLs" VALUE="0">');
	parent.win.document.write('<PARAM NAME="DefaultFrame" VALUE="datawindow">');
	parent.win.document.write('<embed src="' + text + '" width="' + breite + '" height="' + hoehe + '" autostart="false" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer1">');
	parent.win.document.write('</embed>');
	parent.win.document.write('</OBJECT>');
	parent.win.document.write('</BODY></HTML>');
	parent.win.document.close();
}

//IEfix mouseclick
function ExplorerFix() 
{ for (a in document.links) document.links[a].onfocus = document.links[a].blur; 
}
if(document.all) document.onmousedown = ExplorerFix;

var expDays = 1; // number of days the cookie should last

var page = "/1_0_popup.asp";
var pageName = "bgsound"
var windowprops = "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=175,height=50";

function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;   
document.cookie = name + "=" + escape (value);
}
function DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
   }
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

//window.open(page,pageName,windowprops);

}
else {
count++;
SetCookie('count', count, exp);
   }
}

// Show/Hide functions for pointer objects

function init() {
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
        if (ns4) block = document.blockDiv
        if (ie4) block = blockDiv.style
}	

function showObject(obj) {
        if (ns4) obj.visibility = "show"
        else if (ie4) obj.visibility = "visible"
}	

function hideObject(obj) {
        if (ns4) obj.visibility = "hide"
        else if (ie4) obj.visibility = "hidden"
}