
<!-- Popup - Contest - Popup Layer - Tip een vriend
// Dit script zorgt ervoor dat de Popup maar 1 keer komt en dus niet bij een 
// refreshing van de pagina / bij het einde van een sessie komt ie opnieuw.

var fenetre=null;
	
	function GetFvpCookie(DPName) {

	var Fvpsearch = DPName + "="
	var returnFvpValue = "";

	if (document.cookie.length > 0) {
	fvpOffset = document.cookie.indexOf(Fvpsearch)

		if (fvpOffset != -1) {
		fvpOffset += Fvpsearch.length
		fvpend = document.cookie.indexOf(";",fvpOffset);
		
		if (fvpend == -1)
		fvpend = document.cookie.length;
		returnFvpValue=unescape(document.cookie.substring(fvpOffset, fvpend))
		}
	}
	return returnFvpValue;
	}

<!-- Popup - Contest - Popup Layer - Tip een vriend
/***********************************************
* Link Floatie script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
*
* Link Floatie work in IE4+, NS6+, Mozilla/Firefox, and Opera 7, though the fading effect is absent from Opera.
***********************************************/

//function popup() { 
//showfloatie('Nog een keer kans maken ?',floattext[0], event, '', 275, 400);
//}

var floattext = new Array()
floattext[0]  = 'vul hier eventueel een tekst in'
floattext[1]  = '<IMG SRC="photo1.jpg"><BR>testing de popup<BR>'

var floatiewidth	="250px" 	//default width of floatie in px
var floatieheight	="300px"	//default height of floatie in px. Set to "" to let floatie content dictate height.
var floatiebgcolor	="lightyellow" 	//default bgcolor of floatie
var fadespeed		=50 		//speed of fade (5 or above). Smaller=faster.

var baseopacity=0

	
function slowhigh(which2) {
	
	imgobj=which2
	browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""

	instantset(baseopacity)
	highlighting=setInterval("gradualfade(imgobj)",fadespeed)
	}


function instantset(degree) {

	cleartimer()
	if (browserdetect=="mozilla")
	imgobj.style.MozOpacity=degree/100

	else if (browserdetect=="ie")
	imgobj.filters.alpha.opacity=degree
	}


function cleartimer() {
	if (window.highlighting) clearInterval(highlighting)
	}


function gradualfade(cur2) {

	if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
	cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)

	else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
	cur2.filters.alpha.opacity+=10

	else if (window.highlighting)
	clearInterval(highlighting)
	}


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


function paramexists(what) {
	return(typeof what!="undefined" && what!="")
	}


function showfloatie(title, thetext, e, optbgColor, optWidth, optHeight){
	
	var floatobj=document.getElementById("dhtmlfloatie")

	floatobj.style.left="-900px"
	floatobj.style.display="block"

	//floatobj.style.backgroundColor=paramexists(optbgColor)? optbgColor : floatiebgcolor

	floatobj.style.width = paramexists(optWidth)?  optWidth+"px"  : floatiewidth
	floatobj.style.height= paramexists(optHeight)? optHeight+"px" : floatieheight!=""? floatieheight : ""

	winWidth	= document.all&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
	winHeight	= document.all&&!window.opera? ietruebody().clientHeight : window.innerHeight

	scrollwidth	= (window.pageXOffset)? pageXOffset : ietruebody().scrollLeft;
	scrollheight	= (window.pageYOffset)? pageYOffset : ietruebody().scrollTop;

	paddingwidth 	= 0;
	paddingheight 	= 0;

	browserwidth	= (winWidth) ?  (winWidth-optWidth-paddingwidth)/2 + scrollwidth : 0;
	browserheight	= (winHeight) ? (winHeight-optHeight-paddingheight)/2 + scrollheight : 0;

	var left = Math.round(browserwidth*1)/1;
	var top  = Math.round(browserheight*1)/1;

	floatobj.innerHTML = "<TABLE CELLPADDING=0 CELLSPACING=0 WIDTH=100% HEIGHT=100% BORDER=0 class=popup_box><TR><TD class=popup_kop>" +title+ "</TD></TR><TR><TD class=popup_main VALIGN=TOP>" +thetext+ "</TD></TR><TR><TD class=popup_kop align=right><a href='javascript:hidefloatie();'>Sluit venster</a></TD></TR></TABLE>"

	//e=window.event? window.event : e
	
	floatobj.style.left=+left+"px"
	floatobj.style.top=+top+"px"

	slowhigh(floatobj)
	}


function hidefloatie()	{
	var floatobj=document.getElementById("dhtmlfloatie")
	floatobj.style.display="none"
	}


//-->









<!-- Set Pointer functie voor verandering van de kleur

	function setPointer(theRow, thePointerColor) {
		if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
		return false;
		}

		var row_cells_cnt = theRow.cells.length;

		for (var c = 0; c < row_cells_cnt; c++) {
		theRow.cells[c].bgColor = thePointerColor;
		}

	return true;
	}
	//-->




<!--
// mouseover functions
nav_hilite_subkop_color = '#FFFFFF';
function nav_menu_hilite(item) {
	item.style.backgroundColor = nav_hilite_subkop_color;
	item.style.cursor='hand';
	}

function nav_menu_unhilite(item,color) {
	item.style.backgroundColor = color
	}
//-->





<!-- Top frame

	//if (top.frames.length!=0)
	//top.location=self.document.location; 
	//-->



<!-- Bookmark

	var url   = "http://www.buitensportmarkt.nl";
	var title = "Buitensportmarkt – voor liefhebbers van lekker eten, drinken en reizen!";

	function makeLink() {
	if(document.all)
	window.external.AddFavorite(url,title)
	}
	//-->




<!-- Verwijder functie's

	function verwijderen(url){
	if(confirm("Weet u zeker dat u dit artikel wilt verwijderen?")){
	document.location = url;
	}
	}

	function verwijderen_categorie(url){
	if(confirm("Weet u zeker dat u deze categorie en alle artikelen in deze categorie wilt verwijderen?")){
	document.location = url;
	}
	}

	function verwijderen_subcategorie(url){
	if(confirm("Weet u zeker dat u deze subcategorie en alle artikelen in deze subcategorie wilt verwijderen?")){
	document.location = url;
	}
	}

	function verwijderen_plaatje(url){
	if(confirm("Weet u zeker dat u de foto wilt verwijderen?")){
	document.location = url;
	}
	}

	function verwijderen_banner(url){
	if(confirm("Weet u zeker dat u deze banner wilt verwijderen?")){
	document.location = url;
	}
	}


	function verwijderen_user(url){
	if(confirm("Weet u zeker dat u deze gebruiker en alle advertentie's van deze gebruiker wilt verwijderen?")){
	document.location = url;
	}
	}

	function bezoekers(url){
	if(confirm("Weet u zeker dat u de bezoekers van dit artikel wilt legen?")){
	document.location = url;
	}
	}

	function verwijderen_backup(url){
	if(confirm("Weet u zeker dat u deze backup wilt verwijderen?")){
	document.location = url;
	}
	}

	function verwijderen_contest(url){
	if(confirm("Weet u zeker dat u deze Prijsvraag en alle aanmeldingen hierin wilt verwijderen?")){
	document.location = url;
	}
	}
	//-->




<!-- Dropdown functie's

	function gone(){
	location=document.categorie.zoeken.options[document.categorie.zoeken.selectedIndex].value
	}

	function gone1(){
	location=document.subcategorie.zoeken.options[document.subcategorie.zoeken.selectedIndex].value
	}
	//-->





<!-- Zoekfunctie's 
function gone(){
location=document.categorie.zoeken.options[document.categorie.zoeken.selectedIndex].value
}

function gone1(){
location=document.subcategorie.zoeken.options[document.subcategorie.zoeken.selectedIndex].value
}

function gone2(){
location=document.subcategorie1.zoeken.options[document.subcategorie1.zoeken.selectedIndex].value
}

function gone3(){
location=document.subcategorie2.zoeken.options[document.subcategorie2.zoeken.selectedIndex].value
}
//-->







<!-- Popup
	function bigPicWindow(imageWidth,imageHeight,rid) {
	
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;
	
	if(w<740){
	var lift=0.90;
	}
	   
	if(w>=740 & w<835){
	var lift=0.91;
	}
    
	if(w>=835){
	var lift=0.93;
	}
        
	if (imageWidth>w) {
                byFactor = w / imageWidth;
                imageWidth = w;
                imageHeight = imageHeight * byFactor;
       		}
      
	if (imageHeight>h-adj) {
                byFactor = h / imageHeight;
                imageWidth = (imageWidth * byFactor);
                imageHeight = h;
        	}

        var scrWidth = w-adj;
        var scrHeight = (h*lift)-adj;

        if (imageHeight>scrHeight){
                imageHeight=imageHeight*lift;
                imageWidth=imageWidth*lift;
        	}

        var posLeft=0
        var posTop=0
        posTop = (scrHeight-imageHeight)/2;
        posLeft = ((w-imageWidth)/2);
        scrHeight = imageHeight-adj;
        scrWidth = imageWidth-adj;
        imageHeight=imageHeight-adj;
        imageWidth=imageWidth-adj;

        newWindow = window.open("image.jsp?scrWidth="+scrWidth+"&scrHeight="+scrHeight+"&imgWidth="+imageWidth+"&imgHeight="+imageHeight, "newWindow", "width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop+"");

	newWindow.document.write("<HTML><HEAD><TITLE>Buitensportmarkt.nl</TITLE></HEAD>");
	newWindow.document.write("<BODY leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 bgcolor=#FFFFFF onBlur=self.close() onClick=self.close()>");
	newWindow.document.write("<TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="+imageWidth+" HEIGHT="+imageHeight+" BORDER=0>");
	newWindow.document.write("<TR><TD><img src='"+rid+"' width="+imageWidth+" height="+imageHeight+" border=0></TD></TR>");
	newWindow.document.write("</TABLE></BODY></HTML>");
        newWindow.focus();
	}
	//-->










function Banner(refreshTime, width, height, altText, start, random){
	this.objName = "bannerAd" + (Banner.count++);
	eval(this.objName + "=this");
	if (!refreshTime) this.refreshTime = 5000; else this.refreshTime = refreshTime*1000;
	if (!width) this.width   = 468; else this.width = width;
	if (!height) this.height = 60;  else this.height = height;
	if (random == null) this.random = 1; else this.random = random;
	this.altText = altText;
	this.ads = [];
	if (start) this.currentAd = start-1; else start = null;
	this.mySize = 0;

	this.Ad = function(src, href, target, mouseover) {
		var tempImage = new Image();
		tempImage.src = src;
		this.ads[this.mySize] = new Object();
		var ad = this.ads[this.mySize];
		ad.src = src;
		if (typeof(target) == "undefined" || target == null) ad.target = "_self"; else ad.target = target;
		ad.href = href;
		ad.mouseover = mouseover;
		this.mySize++;
		}


	this.link = function(){
		var ad = this.ads[this.currentAd];
		if (ad.target == "_self" || ad.target == "_top"){	
			location.href = ad.href; 
			}

		else if (ad.target == "_blank" || ad.target == "_new"){
			open(ad.href,this.objName + "Win");
			}

		else top.frames[ad.target].location.href = ad.href;
		}

	this.showStatus = function(){
		var ad = this.ads[this.currentAd];
		if (ad.mouseover) status = ad.mouseover;
		else status = ad.href;
	}


	this.randomAd = function(){
		var n;
		do { n = Math.floor(Math.random() * (this.mySize)); } 
		while(n == this.currentAd);
		this.currentAd = n;
	}

	this.output = function(){
		var tempCode = "";
		if (this.mySize > 1){
			if (this.currentAd == null) this.randomAd();
			if (this.currentAd >= this.mySize) this.currentAd = this.mySize - 1;
			tempCode =  '<a href="javascript:'+this.objName+'.link();"';
			tempCode += ' onMouseOver="' + this.objName + '.showStatus(); return true"';
			tempCode += ' onMouseOut="status=\'\';return true">';
			tempCode += '<img src="' + this.ads[this.currentAd].src + '" width="' + this.width;
			tempCode += '" name="' + this.objName + 'Img" height="' + this.height + '" ';
			if (this.altText) tempCode += 'alt="'+this.altText + '" ';
			tempCode += 'border="0" /></a>';
			document.write(tempCode);
			this.nextAd();
	
		} else document.write("");
	}

	this.newAd = function(){
		if (!this.random){	
			this.currentAd++;
			if (this.currentAd >= this.mySize)
			   this.currentAd = 0;
		}
		else {
			this.randomAd();
		}
		this.nextAd();
	}

	
	this.nextAd = function(){
		document.images[this.objName+ 'Img'].style.filter="blendTrans(duration=2)";
		document.images[this.objName+ 'Img'].style.filter="blendTrans(duration=crossFadeDuration)";
		document.images[this.objName+ 'Img'].filters.blendTrans.Apply();

		document.images[this.objName+ 'Img'].src = this.ads[this.currentAd].src;
		document.images[this.objName+ 'Img'].filters.blendTrans.Play();
		setTimeout(this.objName+'.newAd()',this.refreshTime)
	}
}
Banner.count = 0;