/*
  general functions
*/
var aPopups = new Array();
var aModalPopups = new Array();

window.onfocus = function()
{
	if(aModalPopups.length != 0)
	{
		aModalPopups[0].focus();
	}
}


var sDefaultFeatures = 'channelmode=0, fullscreen=0, location=0, menubar=0, resizable=0, scrollbars=0, status=0, titlebar=0, toolbar=0';

// create popup
function createPopup(sURL, name, sFeatures, iWidth, iHeight){
	var iLeft	= (screen.availWidth - iWidth) / 2;
	var iTop	= (screen.availHeight - iHeight) / 2;
	
	return window.open(sURL, name, sFeatures + ', width=' + iWidth + ', height=' + iHeight + ', left=' + iLeft + ', top=' + iTop);
}


// getcookie
function getCookie(name){
	var aCookie = document.cookie.split("; ");
	
	for (var i=0; i < aCookie.length; i++){
		var aCrumb = aCookie[i].split("=");
		if (name == aCrumb[0]){
			return unescape(aCrumb[1]);
		}
	}
	
	return null;
}

/*
  getElementsByClassName	
*/
document.getElementsByClassName = function (needle){
    var s = [document.documentElement || document.body], i = 0, r = [], l = 0, e;
    var re = new RegExp('(^|\\s)' + needle + '(\\s|$)');

    do{
        e = s[i];

        while (e){
            if (e.nodeType == 1){
                if (e.className && re.test(e.className)) r[l++] = e;

                s[i++] = e.firstChild;
            }

            e = e.nextSibling;
        }
    }
	
    while (i--);

    return r;
}
 /*
handleBodyload
*/

function handleBodyLoad(){

  initMainNav();
  initBannerFader();
  markLinks();

  //valignThumbnails();

  initGallery2009();


}

function initThumbnails(){
  //alert('initThumbnails');
} /*
  banners
*/

function initBannerFader(){

	// hide for old browsers
	if(!document.getElementById || !document.createElement || !document.getElementById('imageContainer')) return;

	var li = document.getElementById('listContainer').getElementsByTagName('a');

	window.anchors = new Array();
	window.current = 0;
	window.pause = false;
	window.loaded = -1;
	window.loading = true;

	// set opacity to 0 for all images, except the first image 
	anchors = document.getElementById('imageContainer').getElementsByTagName('img');

	// get the rest of the images that are loaded in the listBanners pagelet
	window.alternateImgs = document.getElementById('listContainer').getElementsByTagName('a');
	window.totalImages = window.alternateImgs.length + anchors.length;

	anchors[0].style.display = 'block';
	anchors[0].xOpacity = .99;
	anchors[0].onload = function(){

		window.loaded = 0;
		 // if there are more images availbale fade them in
		if(window.alternateImgs.length) addImage(window.alternateImgs[0].href);

		setTimeout(fadeBanners, 5000);
	}
}

function fadeBanners(){

	if(window.loading){
		setTimeout(fadeBanners, 5000);
		return;
	}

	cOpacity = anchors[current].xOpacity;
	nIndex = anchors[current+1]?current+1:0;
	nOpacity = anchors[nIndex].xOpacity;
	cOpacity -= .05;
	nOpacity += .05;

	anchors[nIndex].style.display = 'block';
	anchors[current].xOpacity = cOpacity;
	anchors[nIndex].xOpacity = nOpacity;

	setOpacity(anchors[current]); 
	setOpacity(anchors[nIndex]);

	if(cOpacity<=0){
		anchors[current].style.display = 'none';
		current = nIndex;

		if(window.alternateImgs.length > window.loaded){
			window.loading=true;
			addImage(window.alternateImgs[window.loaded].href);
		}

		setTimeout(fadeBanners,5000);
	}else{
		setTimeout(fadeBanners,50);
	}

	function setOpacity(obj){
		if(obj.xOpacity>.99){
			obj.xOpacity = .99;
			return;
		}

		obj.style.opacity = obj.xOpacity;
		obj.style.MozOpacity = obj.xOpacity;
		obj.style.filter = 'alpha(opacity=' + (obj.xOpacity*100) + ')';
	}
}

function addImage(imgSrc){

	var newImage = document.createElement('img');
	newImage.src = imgSrc;
	newImage.xOpacity = 0;

	document.getElementById('imageContainer').appendChild(newImage);
	newImage.style.display = 'none';

	newImage.onload = function(){
		window.loading = false;
		window.anchors = document.getElementById('imageContainer').getElementsByTagName('img');
	}

	window.loaded++;
} /*
  initGallery2009	
*/
function initGallery2009(){
	
	window.TnCollection = new Array();
	
	if(document.getElementsByClassName('newsImages').length){
		var newsImages = document.getElementsByClassName('newsImages')[0];
		var linksA = newsImages.getElementsByTagName('a');
		
		for(var i = 0; i < linksA.length; i++){
			window.TnCollection.push(linksA[i]);
		}
	}

	if(document.getElementsByClassName('album').length){
		var album = document.getElementsByClassName('album')[0];
		var linksB = album.getElementsByTagName('a');
		
		for(var i = 0; i < linksB.length; i++){
			window.TnCollection.push(linksB[i]);
		}
	}

	var initPaging = false;
	if(window.TnCollection.length > 1)initPaging = true;

	for(var i = 0; i < window.TnCollection.length; i++){
		window.TnCollection[i].onclick = function(){
			createPopup2009(this, initPaging);
			return false;
		}
	}
}


function createPopup2009(thisElement, initPaging){
	var picture = thisElement.href;
	var titleText = 'Vera Koedooder';
	//var imageInstance = new Image();
	//imageInstance.src = unescape(picture);
	//var imageWidth = imageInstance.width;
	var borderColor = '#fff';

	var buttonNext = '/img/template/popup/popup-volgende.png';
	var buttonPrev = '/img/template/popup/popup-vorige.png';
	var buttonClose = '/img/template/popup/popup-sluiten.png';
	var loaderImg = '/img/template/popup/loader.gif';

	var nextTitle = 'Volgende afbeelding';
	var prevTitle = 'Vorige afbeelding';
	var closeTitle = 'Sluiten';

	// remove old wrapper
	closePopup2009();
	
	// position y of wrapper
	var Geometry = {};
	if(window.innerWidth) { //All but IE
		Geometry.getVerticalScroll = function() { return window.pageYOffset; };
	} else if (document.documentElement && document.documentElement.clientWidth) { //IE6 with doctype
		Geometry.getVerticalScroll = function() { return document.documentElement.scrollTop; };
	} else if (document.body.clientWidth){
		Geometry.getVerticalScroll = function() { return document.body.scrollTop; };
	}
	var yPos = Geometry.getVerticalScroll();
			
	// popupLoader
	popupLoader = document.createElement('div');
	popupLoader.id = 'popupLoader';
	popupLoader.style.border = '2px '+borderColor+' solid';
	popupLoader.style.display = 'block';
	popupLoader.style.position = 'absolute';
	popupLoader.style.left = '50%';
	popupLoader.style.marginLeft = '-21px';
	popupLoader.style.top = yPos+250+'px';
	popupLoader.style.zIndex = '99';
	popupLoader.style.width = '42px';
	popupLoader.style.height = '42px';
	popupLoader.style.backgroundImage = 'url('+loaderImg+')';
	popupLoader.style.backgroundPosition = 'top left';
	document.body.appendChild(popupLoader);
	
	// popup div
	popup = document.createElement('div');
	popup.id = 'popupWrapper';
	popup.style.backgroundColor = borderColor;
	popup.style.border = '10px '+borderColor+' solid'; 
	//popup.style.borderTop = '30px '+borderColor+' solid';
 	popup.style.position = 'absolute';
	popup.style.left = '100px';
	popup.style.top = '50px';
	popup.style.zIndex = '101';
	popup.style.display = 'block';
	popup.style.visibility = 'hidden';

	// header div
	var popupHeader = document.createElement('div');
	popupHeader.id = 'popupHeader';
	popupHeader.style.position = 'relative';
	popupHeader.style.zIndex = '3';
	//popupHeader.style.height = '30px';
	
	popup.appendChild(popupHeader);
	
		var headerTitle = document.createElement('h3');
		headerTitle.appendChild(document.createTextNode(titleText));
		headerTitle.id = 'headerTitle';
		//headerTitle.style.marginTop = '-20px';
		popupHeader.appendChild(headerTitle);
		
		// close link
		var popupCloseLink = document.createElement('a');
		popupCloseLink.href = '#';
		popupCloseLink.id = 'popupCloseLink';
		popupCloseLink.title = closeTitle;
		popupCloseLink.onclick = function(){
			closePopup2009();
			return false; 
		}
		popupCloseLink.style.display = 'block';
		popupCloseLink.style.width = '17px';
		popupCloseLink.style.height = '17px';
		popupCloseLink.style.position = 'absolute';
		popupCloseLink.style.top = '0px';
		popupCloseLink.style.right = '0px';
		popupCloseLink.style.backgroundImage = 'url('+buttonClose+')';
		popupCloseLink.style.backgroundPosition = 'top left';
		popupCloseLink.style.backgroundRepeat = 'no-repeat';
		popupHeader.appendChild(popupCloseLink);
	
	// img container
	var imgContainer = document.createElement('div');
	imgContainer.id = 'imgContainer';
	imgContainer.style.position = 'relative';
	imgContainer.style.zIndex = '2';
	imgContainer.style.overflow = 'hidden';
	
	popup.appendChild(imgContainer);

		if(initPaging == true){
			var overPrev = document.createElement('div');
			overPrev.id = 'overPrev';
			overPrev.title = prevTitle;
			overPrev.style.position = 'absolute';
			overPrev.style.top = '100px';
			overPrev.style.left = '0';
	
			overPrev.style.width = '80px';
			overPrev.style.height = '30px';
			overPrev.style.backgroundImage = 'url('+buttonPrev+')';
			overPrev.style.backgroundPosition = 'top left';
			overPrev.style.backgroundRepeat = 'no-repeat';
			overPrev.style.display = 'none';
			
			imgContainer.appendChild(overPrev);
			
			var overNext = document.createElement('div');
			overNext.id = 'overNext';
			overNext.title = nextTitle;
			overNext.style.position = 'absolute';
			overNext.style.top = '100px';
			overNext.style.right = '0';
			overNext.style.width = '80px';
			overNext.style.height = '30px';
			overNext.style.backgroundImage = 'url('+buttonNext+')';
			overNext.style.backgroundPosition = 'top right';
			overNext.style.backgroundRepeat = 'no-repeat';
			overNext.style.display = 'none';
			
			imgContainer.appendChild(overNext);

			// prev link
			var prevImg = document.createElement('a');
			prevImg.href = '#';
			prevImg.id = 'prevImg';
			prevImg.onclick = function(){
				this.blur();
				initPaging2009('prev');
				return false; 
			}
			prevImg.onmouseover = function(){
				document.getElementById('overPrev').style.display = 'block';
			}
			prevImg.onmouseout = function(){
				document.getElementById('overPrev').style.display = 'none';
			}
			prevImg.style.display = 'block';
			prevImg.style.width = '150px';
			prevImg.style.height = '1000px';
			prevImg.style.position = 'absolute';
			prevImg.style.top = '0';
			prevImg.style.left = '0';
			prevImg.style.backgroundColor = '#fff';
			prevImg.style.filter = 'alpha(opacity=0)';
			prevImg.style.mozOpacity = '0.0';
			prevImg.style.opacity = '0.0';
			
			imgContainer.appendChild(prevImg);
	
			// next link
			var nextImg = document.createElement('a');
			nextImg.href = '#';
			nextImg.id = 'nextImg';
			nextImg.onclick = function(){
				this.blur();
				initPaging2009('next');
				return false; 
			}
			nextImg.onmouseover = function(){
				document.getElementById('overNext').style.display = 'block';
			}
			nextImg.onmouseout = function(){
				document.getElementById('overNext').style.display = 'none';
			}
	
			nextImg.style.display = 'block';
			nextImg.style.width = '150px';
			nextImg.style.height = '1000px';
			nextImg.style.position = 'absolute';
			nextImg.style.top = '0';
			nextImg.style.right = '0';
			nextImg.style.backgroundColor = '#fff';
			nextImg.style.filter = 'alpha(opacity=0)';
			nextImg.style.mozOpacity = '0.0';
			nextImg.style.opacity = '0.0';
			
			imgContainer.appendChild(nextImg);
		}

	/* popup append */
	document.body.appendChild(popup);
	
	// popup image big
	var popupImage = document.createElement('img'); 
	popupImage.id = 'popupImageBig';
	
	popupImage.onload = function(){
		var imgW = this.width;
		var imgH = this.height;

		var yPos = Geometry.getVerticalScroll();	

document.getElementById('popupHeader').getElementsByTagName('h3')[0].innerHTML = '<span>' + thisElement.getElementsByTagName('img')[0].getAttribute('alt') + '</span>';


		document.getElementById('popupHeader').style.width = imgW +'px';
			
		document.getElementById('popupWrapper').style.top = yPos+100+'px';
		document.getElementById('popupWrapper').style.left = '50%';
		document.getElementById('popupWrapper').style.marginLeft = this.width/-2+'px';

		document.getElementById('popupWrapper').style.visibility = 'visible';
		document.getElementById('popupCloseLink').style.left =  this.width - 25 + 'px';
	}
	popupImage.src = unescape(picture);
	
	imgContainer.appendChild(popupImage);

}

function closePopup2009(){
	if(document.getElementById('popupLoader')){
		document.getElementById('popupLoader').parentNode.removeChild(document.getElementById('popupLoader'));
	}
	if(document.getElementById('popupWrapper')){
		document.getElementById('popupWrapper').parentNode.removeChild(document.getElementById('popupWrapper'));
	}
}

function initPaging2009(prevnext){
	var currentImg = unescape(document.getElementById('popupImageBig').src);
	var currentImgNr = 0;
	var initPaging = false;
	if(window.TnCollection.length > 1)initPaging = true;

	for(var i = 0; i < window.TnCollection.length; i++){
		if(unescape(window.TnCollection[i].href) == currentImg){
			currentImgNr = i;

		}
	}
	
	if(prevnext == 'next'){
		if(currentImgNr + 1 > window.TnCollection.length-1){
			closePopup2009();
			createPopup2009(window.TnCollection[0], initPaging);
		} else {
			closePopup2009();
			createPopup2009(window.TnCollection[currentImgNr+1], initPaging);
		}
	} else if (prevnext == 'prev'){
		if(currentImgNr - 1 < 0){
			closePopup2009();
			createPopup2009(window.TnCollection[window.TnCollection.length-1], initPaging);
		} else {
			closePopup2009();
			createPopup2009(window.TnCollection[currentImgNr-1], initPaging);
		}
	}
}

 /*
  main-nav for IE6
*/
function initMainNav() {
	if (document.all && document.getElementById) {
		var nodes = document.getElementById('main-nav').getElementsByTagName('li');
		for (i = 0; i < nodes.length; i++) {
			if (nodes[i].nodeName.toUpperCase() == 'LI') {
				
				nodes[i].onmouseover = function(){
					this.className += ' hover';
				}
				
				nodes[i].onmouseout = function() {
					this.className = this.className.replace('hover', '');
				}
			}
		}
	}
} // mark links
function markLinks(){
	var links = document.getElementsByTagName('a');
	var link, href, mark;
	
	for(var i = 0; i < links.length; i++){
		link = links[i];
		
			
		switch(link.getAttribute('rel')){
			case 'ext': case 'external':
				link.className += ' external';
				link.target = '_blank';
				
				
				if(link.getElementsByTagName('img').length == 0){
					href = link.getAttribute('href').toLowerCase();
					href = href.substring((href.length - 4), (href.length));
					switch(href){
						case '.pdf':
							link.className += ' pdf';
							mark = document.createElement('img');
							mark.src = '/data/link-icons/pdf.png';
							link.insertBefore(mark , (link.firstChild));
							break;
						
						case '.xls':
							link.className += ' pdf';
							mark = document.createElement('img');
							mark.src = '/data/link-icons/xls.png';
							link.insertBefore(mark , (link.firstChild));
							break;
							
						case '.doc':
							link.className += ' pdf';
							mark = document.createElement('img');
							mark.src = '/data/link-icons/doc.png';
							link.insertBefore(mark , (link.firstChild));
							break;
							
						case '.ppt':
							link.className += ' pdf';
							mark = document.createElement('img');
							mark.src = '/data/link-icons/ppt.png';
							link.insertBefore(mark , (link.firstChild));
							break;
							
						default:
							mark = document.createElement('img');
							mark.src = '/data/link-icons/external.png';
                                                        mark.className = 'externalLinkImage';
							link.appendChild(mark);
							break;
				}
			}
		}
	}
	
	links = document.getElementById('content').getElementsByTagName('a');
	
	for(var i = 0; i < links.length; i++){
		if(links[i].getAttribute('href')){
			href = document.createElement('span');
				href.className = 'print';
				href.appendChild((document.createTextNode(' [' + links[i].href + ']')));
			
			links[i].appendChild(href);
		}
	}
	
	mark = null;
	href = null;
	link = null;
	links = null;
} /**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; /*
  valignThumbnails
*/

function valignThumbnails(){
  var imgWrappers = document.getElementsByClassName('image');
  if(imgWrappers .length == 0) return false;

    for(i = 0; i < imgWrappers.length; i++){
      var wrap = imgWrappers[i];
      var img = wrap.getElementsByTagName('img')[0];
      
      img.style.marginTop = (wrap.clientHeight - img.clientHeight)/2 +'px';
    }
}
