//JS-Document     

var ns4=document.layers;
var ie4=document.all;
var ns6=document.getElementById&&!document.all;

//drag drop function for NS 4////
/////////////////////////////////

var dragswitch=0;
var nsx;
var nsy;
var nstemp;

var survey_url= "http://www.eresult.de/umfragen/mydays2009/index.php"; 


document.cookie="check=check_cookies;path=/;Expires=Sat,20 Feb 2010 12:00:00 UTC"; 
if (document.cookie.indexOf("check=check_cookies") != -1){

	if (Math.random() <= 0.5){ // 0.2=jeder 5te Teilnehmer 
		if (document.cookie.indexOf("survey=mydays_onsite_1109") == -1){
		    document.cookie="survey=mydays_onsite_1109;path=/;Expires=Sat,20 Feb 2010 12:00:00 UTC"; 
		   random_img();
		}
	}
}

function initializedrag(e){
	crossobj=ns6? document.getElementById("showimage") : document.all.showimage;
	crossobj2=ns6? document.getElementById("ifra") : document.all.ifra;
}
document.onmousedown=initializedrag;

function openwin(url)
{
  /* the height of the popup window */
  var eresult_popup_height        = 700;
  
  /* the widht of the popup window */
  var eresult_popup_width         = 1000; // breite des Popups
  
  /* shall the popup window show the toolbar */
  var eresult_popup_toolbar       = "no";
  
  /* shall the popup show the scrollbars */
  var eresult_popup_scrollbar     = "yes";
  
  /* shall the popup show the locationbar */
  var eresult_popup_locationbar   = "no";
  
  /* shall the popup show the resizable */
  var eresult_popup_resizable   = "yes";
  
  /* shall the popup show the menubar */
  var eresult_popup_menubar   = "no"; // 
  
    /* shall the popup show the statusbar */
  var eresult_popup_status   = "yes"; // 
  
  
  /* the window object. do not change */
  var eresult_mywindow            = false;
  
  

    var window_parameter = 'left='+((screen.width-eresult_popup_width)/2)+', ';
    window_parameter = window_parameter+'top='+((screen.height-eresult_popup_height)/2)+', ';
    window_parameter = window_parameter+'height='+eresult_popup_height+', ';
    window_parameter = window_parameter+'width='+eresult_popup_width+', ';
    window_parameter = window_parameter+'toolbar='+eresult_popup_toolbar+', ';
    window_parameter = window_parameter+'scrollbars='+eresult_popup_scrollbar+', ';
    window_parameter = window_parameter+'location='+eresult_popup_locationbar+', ';
    window_parameter = window_parameter+'resizable='+eresult_popup_resizable+', ';
    window_parameter = window_parameter+'menubar='+eresult_popup_menubar+'';
	window_parameter = window_parameter+'status='+eresult_popup_status+'';
    check_window = window.open(url,"win_survey", window_parameter);
}


function hidebox(){
	if (ie4||ns6){
		crossobj.style.visibility="hidden";
		crossobj2.style.visibility="hidden";
	} else if (ns4){
		document.showimage.visibility="hide";
		document.ifra.visibility="hide";
	}
}


function random_img(){
	
document.write("<iframe id='ifra' scrolling='no' style='position:absolute;left:450px;top:150px;width:445px;height:405px; background-color: white;' src=''></iframe>");
document.write("<div id='showimage' style='border:1px solid #999999; padding: 5px; position:absolute;width:442px;left:450px;top:150px;z-index:1000;  background-color: white;'>");
document.write("<table border=0 width=431 bgcolor=#FFFFFF cellspacing=0 cellpadding=1 style=' background-color: white;' align='center'>");
document.write("<tr>");
document.write("<td width=100%><table border=0 width=100% cellspacing=8 cellpadding=0>");

document.write("<tr bgcolor='#FFFFFF'>");

document.write("<td height='22' colspan='2' style='cursor:hand;border-bottom:1px dotted #7f7f7f;' valign=top align=right><a href='#' onClick='hidebox();return false'><b><img src='/images/umfrage/close_button.gif' border=0></a></td>");
document.write("</tr>");


document.write("<tr bgcolor='#FFFFFF'>");
document.write("<td width=100% colspan=2 align=left ><img src='/images/umfrage/top_banner.gif'  border=0> ");
document.write("</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td width='100%' colspan='2'>");


//Inhalt-Beginn
document.write("<table border=0 width=100% cellspacing=0 cellpadding=0>");

document.write("<tr> ");
document.write("<td width=100% style='border-top:1px dotted #7f7f7f;'><p style='font-size:14px; font-family:Arial, sans-serif; color:#666666;margin-top:10px;'><b>Ihre Meinung ist uns wichtig!</b></p></td>");
document.write("</tr>");

document.write("<tr> ");
document.write("<td width=100%><p style='font-size:12px; font-family:Arial, sans-serif; color:#666666;margin-top:20px;margin-bottom:10px;'>Liebe Besucherin, lieber Besucher, <br><br>helfen Sie mit, den <b>Online Shop mydays.de</b> nach Ihren W&uuml;nschen zu gestalten und nehmen Sie an unserer Umfrage teil. <br><br>Unter allen Teilnehmern verlosen wir drei unserer neuen Erlebnisgeschenk- boxen zum Preis von je 79,- EUR: <br>&nbsp;&nbsp;- <b>Wellness &amp; Wohlbefinden</b> (Massagen, Floating, Make-Up Beratung u.v.m.) <br>&nbsp;&nbsp;- <b>Fun &amp; Action</b> (Canyoning, Paintball, Rafting u.v.m.) <br>&nbsp;&nbsp;- <b>Kochen &amp; Genie&szlig;en</b> (Asiat. Kochkurs, Braukurs, Rotweinseminar u.v.m.)</p></td>");
document.write("</tr>");

document.write("<tr> ");
document.write("<td width=100% valign=top style='border-top:1px dotted #7f7f7f;'><p style='font-size:11px; font-family:Arial, sans-serif; color:#666666;text-align:right;'> <a href='#' onclick='javascript:openwin(survey_url); hidebox();'><img src='/images/umfrage/go_button.gif' style='margin-top:10px;' border=0></a></p><p style='margin-left:2px;font-size:11px; font-family:Arial, sans-serif; color:#666666;text-align:right;'> Der Fragebogen wird in einem extra Fenster ge&ouml;ffnet.<br><br></p><a href='#' onClick='hidebox();'><span style='font-size:11px; font-family:Arial, sans-serif; color:#666666;margin-left:2px;margin-top:10px;'><u>Nein, ich m&ouml;chte nicht an der Befragung teilnehmen.</u></span></a></td>");
document.write("</tr>");
document.write("</table>");
//Inhalt-Ende



document.write("</td>");
document.write("</tr>");
document.write("</table>");


document.write("</td>");
document.write("</tr>");


document.write("</table>");
document.write("</div>");
}
