function winX(n)
	{
	return window.innerWidth != undefined ? window.innerWidth : document.body.offsetWidth;
	}
function winY(n)
	{
	return window.innerHeight != undefined ? window.innerHeight : document.body.offsetHeight;
	}
function showTop10(n,p)
		{
		if (!p){p=window.event;}
		var ScrollTop = document.body.scrollTop;
		if (ScrollTop == 0)
			{
			if (window.pageYOffset)
				{
				ScrollTop = window.pageYOffset;
				}
			else
				{
				ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
				}
			}
		document.getElementById("antwoordDiv").style.display="block";
		document.getElementById("antwoordDiv").style.visibility="hidden";
		
		document.getElementById("innerAntwoordDiv").innerHTML=antwoordTop10[n];
		document.getElementById("antwoordDiv").style.left=winX()/2-180;
		
		yPos = ScrollTop+winY()/2-(xHeight("antwoordDiv")/2);
		document.getElementById("antwoordDiv").style.top=yPos;
		document.getElementById("antwoordDiv").style.visibility="visible";
		
		document.getElementById("iframeRealtracker").src="/includes/realtracker1.lasso?page_id=3";
		}
function realtracker(trackerId)
	{
	document.getElementById("iframeRealtracker").src=("/includes/realtracker1.lasso?page_id="+trackerId);
	}
function showOptin(n)
		{
		var ScrollTop = document.body.scrollTop;
		if (ScrollTop == 0)
			{
			if (window.pageYOffset)
				{
				ScrollTop = window.pageYOffset;
				}
			else
				{
				ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
				}
			}
		document.getElementById("optinDiv").style.display="block";
		document.getElementById("optinDiv").style.visibility="hidden";
		
		document.getElementById("optinDiv").style.left=winX()/2-180;
		
		yPos = ScrollTop+winY()/2-(xHeight("optinDiv")/2);
		document.getElementById("optinDiv").style.top=10;
		document.getElementById("optinDiv").style.visibility="visible";
		}
	
// xHeight, Copyright 2001-2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

function xHeight(e,h)
{
  if(!(e=xGetElementById(e))) return 0;
  if (xNum(h)) {
    if (h<0) h = 0;
    else h=Math.round(h);
  }
  else h=-1;
  var css=xDef(e.style);
  if (e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    h = xClientHeight();
  }
  else if(css && xDef(e.offsetHeight) && xStr(e.style.height)) {
    if(h>=0) {
      var pt=0,pb=0,bt=0,bb=0;
      if (document.compatMode=='CSS1Compat') {
        var gcs = xGetComputedStyle;
        pt=gcs(e,'padding-top',1);
        if (pt !== null) {
          pb=gcs(e,'padding-bottom',1);
          bt=gcs(e,'border-top-width',1);
          bb=gcs(e,'border-bottom-width',1);
        }
        // Should we try this as a last resort?
        // At this point getComputedStyle and currentStyle do not exist.
        else if(xDef(e.offsetHeight,e.style.height)){
          e.style.height=h+'px';
          pt=e.offsetHeight-h;
        }
      }
      h-=(pt+pb+bt+bb);
      if(isNaN(h)||h<0) return;
      else e.style.height=h+'px';
    }
    h=e.offsetHeight;
  }
  else if(css && xDef(e.style.pixelHeight)) {
    if(h>=0) e.style.pixelHeight=h;
    h=e.style.pixelHeight;
  }
  return h;
}
// xGetElementById, Copyright 2001-2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

function xGetElementById(e)
{
  if(typeof(e)=='string') {
    if(document.getElementById) e=document.getElementById(e);
    else if(document.all) e=document.all[e];
    else e=null;
  }
  return e;
}
// xNum, Copyright 2001-2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

function xNum()
{
  for(var i=0; i<arguments.length; ++i){if(isNaN(arguments[i]) || typeof(arguments[i])!='number') return false;}
  return true;
}
// xDef, Copyright 2001-2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

function xDef()
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=='undefined') return false;}
  return true;
}
// xStr, Copyright 2001-2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

function xStr(s)
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])!='string') return false;}
  return true;
}
// xGetComputedStyle, Copyright 2002-2007 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL

function xGetComputedStyle(oEle, sProp, bInt)
{
  var s, p = 'undefined';
  var dv = document.defaultView;
  if(dv && dv.getComputedStyle){
    s = dv.getComputedStyle(oEle,'');
    if (s) p = s.getPropertyValue(sProp);
  }
  else if(oEle.currentStyle) {
    // convert css property name to object property name for IE
    var i, c, a = sProp.split('-');
    sProp = a[0];
    for (i=1; i<a.length; ++i) {
      c = a[i].charAt(0);
      sProp += a[i].replace(c, c.toUpperCase());
    }
    p = oEle.currentStyle[sProp];
  }
  else return null;
  return bInt ? (parseInt(p) || 0) : p;
}


/*
* @Description CREATEFLASHOBJECT
* @Author: YellowMind
* @Date: 29-05-2006
* 
* Avoids Internet Explorer 'click to activate' Flash Update
* Creates your flash object + embed script
* 
* Include createFlashObject.js in your HTML
* use createFlashObject(); to create Flash Object
* 
* PARAMS required
* @param swf:String; your SWF name
* @param width:Number; your SWF width
* @param height:Number; your SWF height
* @param version:Number; your SWF FlashVersion
* 
* PARAMS OPTIONAL
* @param bgcolor:String; your backgroundcolor
* @param vars:String; variables for your flash movie | example: "clickTag1=http://www.megajobs.nl&clickTag2=http://www.yellowmind.nl"
* @param name:String; your SWF object name (for JavaScript use)
* @param scriptAcces:String; your scriptacces propertie (never, samedomain or always)
* @param transparent:Boolean; option to make your SWF Object transparent
* @param class:String; option to define a class name
* 
*/

function createFlashObject(swf, width, height, version, bgcolor, vars, name, scriptAccess, transparent, cls) {
	// Check for required PARAMS
	if(!swf){
		error('no swf defined');
		return false;
	}
	if(!width){
		error('no width defined');
		return false;
	}
	if(!height){
		error('no height defined');
		return false;
	}
	if(!version){
		error('no flash version defined');
		return false;
	}
	
	// Check optional PARAMS
	if(!name) name = 'flashObject';
	if(!cls) cls = '';
	if(!bgcolor)bgcolor = '#ffffff';
	if(!scriptAccess)scriptAccess = 'alway';
	if(!transparent){
		transparent = false;
		wmode = '';
	} else {
		wmode = 'wmode=\"transparent\"';
	}
	if(!vars){
		vars = '';
	} else {
		vars = '?' + vars;
	}
	
	// Create code
	object = '<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + version + ',0,0,0\" width=\"' + width + '\" height=\"' + height + '\" id=\"' + name + '\" align=\"middle\" class=\"' + cls + '\">';
	object += '<param name=\"allowScriptAccess\" value=\"' + scriptAccess + '\" />';
	if(transparent)object += '<param name=\"wmode\" value=\"transparent\">';
	object += '<param name=\"movie\" value=\"' + swf + vars + '\" /><param name=\"quality\" value=\"high\" /><param name=\"menu\" value=\"false\" /><param name=\"bgcolor\" value=\"' + bgcolor + '\" /><embed id=\"' + name + '\" src=\"' + swf + vars + '\" quality=\"high\" bgcolor=\"' + bgcolor + '\" width=\"' + width + '\" height=\"' + height + '\" name=\"' + name + '\" align=\"middle\" allowScriptAccess=\"' + scriptAccess + '\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ' + wmode + ' />';
	object += '</object>';
	document.write(object);
}

function error(message){
	// Output error
	alert(message);
}
