// actual popup
function pop(img, width, height, alt, obj) {
	var screenW = document.documentElement.clientWidth;
	var screenH = document.documentElement.clientHeight;

	var pop = document.createElement('div');
	pop.innerHTML = unescape(img).replace(/\+/g, " ")+"<div style=\"text-align:center; color:#000; padding:4px;\">[ close ]</div>";
	var padding = width/25;
	pop.style.backgroundColor = "#000";
	pop.style.padding = padding + "px";
	pop.style.paddingBottom = padding-padding + "px";
	pop.style.position = "absolute";
	pop.style.zIndex = '1000';
	pop.onclick = function() { this.parentNode.removeChild(this); }
	
	document.getElementsByTagName('body')[0].appendChild(pop);
	pop.style.cursor = "pointer";
	pop.title = "Click to close photo";
	pop.getElementsByTagName('img')[0].style.border = "solid #fff 1px";
	var objW = obj.offsetWidth;
	var objH = obj.offsetHeight;
	var popW = width+(padding*2);//pop.offsetWidth; // !
	var popH = height+(padding*2);//pop.offsetHeight; // !
	var objPos = findPos(obj);
	objL = objPos[0];
	objT = objPos[1];
	popL = objL-((popW-objW)/2) + 7;
	popT = objT-((popH-objH)/2) + 8;
	//alert(popW+ " "+ popH);
	if (popL+popW < screenW) {
		pop.style.left = popL + "px";
	} else {
		pop.style.left = screenW-popW + "px";
	}
	if ((popT + popH) < screenH) {
		pop.style.top = popT + "px";
	} else {
		pop.style.top = screenH-popH + "px";
	}
	
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}
var SyntaxBold= {
  src: 'fla/syntax-bold.swf'
};

var SyntaxBlack= {
  src: 'fla/syntax-black.swf'
};

sIFR.activate(SyntaxBold, SyntaxBlack); // From revision 209 and onwards

sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'h1'
  ,css:    { '.sIFR-root': { 'color' : '#1b1666', 'text-align':'left', 'background-color':'#ffffff', 'z-index':'1' }}});


sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'body.home #col-b h2'
  ,css:    { '.sIFR-root': { 'color' : '#1b1666', 'text-align':'left', 'background-color':'#ffffff', 'z-index':'1' }}});

sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'body.home .case h2',
  css: [ 
      '.sIFR-root { text-align: left; background-color: #ffffff; color: #ffffff; }'
      ,'a { text-decoration: none; color: #ffffff; }'
      ,'a:link { color: #ffffff; text-decoration: none; }'
      ,'a:hover { color: #1b1666; text-decoration: none; }'
    ]});

sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'body.hulp h2',
  css: [ 
      '.sIFR-root { text-align: left; background-color: #ffffff; color: #dc291e; }'
      ,'a { text-decoration: none; color: #dc291e; }'
      ,'a:link { color: #dc291e; text-decoration: none; }'
      ,'a:hover { color: #1b1666; text-decoration: none; }'
    ]});

sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'body.partners h2',
  css: [ 
      '.sIFR-root { text-align: left; background-color: #ffffff; color: #5eb0e5; }'
      ,'a { text-decoration: none; color: #5eb0e5; }'
      ,'a:link { color: #5eb0e5; text-decoration: none; }'
      ,'a:hover { color: #1b1666; text-decoration: none; }'
    ]});

sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'body.regio h2',
  css: [ 
      '.sIFR-root { text-align: left; background-color: #ffffff; color: #b5bf00; }'
      ,'a { text-decoration: none; color: #b5bf00; }'
      ,'a:link { color: #b5bf00; text-decoration: none; }'
      ,'a:hover { color: #1b1666; text-decoration: none; }'
    ]});

sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'body.werkenbij h2',
  css: [ 
      '.sIFR-root { text-align: left; background-color: #ffffff; color: #ea7125; }'
      ,'a { text-decoration: none; color: #ea7125; }'
      ,'a:link { color: #ea7125; text-decoration: none; }'
      ,'a:hover { color: #1b1666; text-decoration: none; }'
    ]});


sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'h2',
  css: [ 
      '.sIFR-root { text-align: left; background-color: #ffffff; }'
      ,'a { text-decoration: none; color: #0072b1; }'
      ,'a:link { color: #0072b1; text-decoration: none; }'
      ,'a:hover { color: #1b1666; text-decoration: none; }'
    ]});
    

    
sIFR.replace(SyntaxBold, {
  wmode: 'transparent',
  selector: 'h3.payoff',
  css: [ 
  '.sIFR-root { color:#ffffff; text-align:right; background-color:#ffffff; letter-spacing:0; }',
  'a 		  { text-decoration: none; }',
  'a:link 	  { color: #00377b; text-decoration:none; }',
  'a:hover 	  { color: #00377b; text-decoration:underline; }',
  'span.klein 	  { color:#5f6a72; font-size:70%; letter-spacing:5px; }'
  ]});
