<!-- Begin
var page = "http://www.kinau-mediaforschung.de/feedback.htm";
//var windowprops = "width=300,height=200,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes";

var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"
var bouncelimit
var direction="up"
var usedropin=1
function PopupMe(){
if (!dom&&!ie&&!ns4){
window.open("http://www.kinau-mediaforschung.de/feedback.htm", "", "scrollbars=1")}else{
bouncelimit=32 //(must be divisible by 8)
crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
crossframe=(dom)?document.getElementById("cframe") : ie? document.all.cframe : document.cframe
crossframe.src="http://www.kinau-mediaforschung.de/feedback.htm"
if(usedropin){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossobj.top=scroll_top-250+calunits}
crossobj.visibility=(dom||ie)? "visible" : "show"
if(usedropin){
dropstart=setInterval("dropin()",50)}}}
function dropin(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<410+scroll_top){
crossobj.top=parseInt(crossobj.top)+40+calunits
if (parseInt(crossobj.top)>410+scroll_top){crossobj.top=410+scroll_top}}else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)}}
function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)}}
function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"}
function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}



//document.write('<body>');
document.write('<div id="dropin" style="position:absolute;visibility:hidden;left:0px;top:410px;width:211px;height:185px;background-color:#F5F5F5;border:solid thin #cccccc;z-index: 7;">');
document.write('<div align="right" style="background-color:navy"><a href="#" onClick="dismissbox();return false"><FONT COLOR="#FFFFFF">[X]<\/FONT><\/a><\/div>');
document.write('<IFRAME ID="cframe" SRC="" width=207 height=185 FRAMEBORDER=0><\/IFRAME><\/div>');
//document.write('<\/body>');


var expDays = 1; // number of days the cookie should last

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;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}
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) {
  if (count == 4) {
    count=5;
    SetCookie('count', count, exp);
    //if (confirm("Moechten Sie Feedback fuer diese Webseite geben?")) {location.href = page;}
    //auskommentiert:
    //PopupMe();
  }
  else {
    count++;
    SetCookie('count', count, exp);
  }
}

function nthvisitor() {
 //var nth = 10;
 var nth = 1.3;
 var rnd = Math.floor(Math.random() * nth) + 1;
 //if (rnd == nth) {
 if (rnd == 1) {
   //alert("treffer");
   checkCount();
 }
}

//nthvisitor();
