<!--

	var	getBrowserSize = function()
	{
    	var bodyWidth = document.documentElement.clientWidth;
    	var bodyHeight = document.documentElement.clientHeight;
    	
		var bodyWidth, bodyHeight; 
		if (self.innerHeight){ // all except Explorer 
		 
		   bodyWidth = self.innerWidth; 
		   bodyHeight = self.innerHeight; 
		}  else if (document.documentElement && document.documentElement.clientHeight) {
		   // Explorer 6 Strict Mode 		 
		   bodyWidth = document.documentElement.clientWidth; 
		   bodyHeight = document.documentElement.clientHeight; 
		} else if (document.body) {// other Explorers 		 
		   bodyWidth = document.body.clientWidth; 
		   bodyHeight = document.body.clientHeight; 
		} 
		return [bodyWidth,bodyHeight];		
		
	}
	var mouseOverZoom = function(element){
	    var target = element;
			target.className = 'mouseOverOp';
		var theImage=element.getElementsByTagName('DIV')[0];
			//alert(theImage.align);
		var newZoom = document.createElement('DIV');
			newZoom.className = 'zoomDiv';
			newZoom.id = 'zoomDiv';
			newZoom.onmouseover = function(){
				mouseOverZoom(element);
			}
		var newZoomImg = document.createElement('IMG');
		    newZoomImg.src='/media/images/zoom.png';
			newZoomImg.style.width='35px';
			newZoomImg.style.height='32px';
			if(!document.getElementById('zoomDiv')){
		 	newZoom.appendChild(newZoomImg);
			target.appendChild(newZoom);
			//theImage.parentNode.insertBefore(newZoom,theImage);
			}
			imageHeight = (theImage.offsetHeight);
			containerElement = theImage.parentNode.parentNode.parentNode.parentNode.parentNode.clientHeight;
			if(imageHeight<130){
			moveElement = 130
			}else{
			moveElement = imageHeight
			}
			//alert(imageHeight);
			newZoom.style.marginTop=-moveElement + 'px';
			//element.insertBefore(document.getElementById('zoomDiv'),theImage);
	}
	var mouseOutZoom = function(element){
		element.className = 'mouseOverOpNone';
		if(document.getElementById('zoomDiv')){
		document.getElementById('zoomDiv').parentNode.removeChild(document.getElementById('zoomDiv'));
		}
	}
	var nameover = function(element){
		element.parentNode.className = 'artistName_ov';
	}
	var nameout = function(element){
		element.parentNode.className = 'artistName';
	}
	var getImage={
		load: function() {
		var dialogHolder = $(document.body);
		var target_array=$$('td.thumb a');
		var target_array_container = $$('td.thumb')
		//alert(target_array[0].href)
		var showimg = new Element('img', {'id' : 'enlarged','style' : 'z-index:1000;'}).hide();
		//var overLay = new Element('div', {'id' : 'overlay','style' : 'z-index:1000; position:absolute; width:600px; height:600px;; background-color:#000000;'}).hide();
		var close_bt = new Element('img', {'src' : '/media/images/close.png','style' : 'width:22px;height:22px;'}).show();
		var close_container = new Element('div', {'id' : 'closecont','style' : 'z-index:3000; position:absolute;width:22px;height:22px;margin-top:-21px;'}).show();
		var loader = new Element('img', {'src' : '/media/images/ajax-loader.gif','style' : 'width:220px;height:19px;'}).show();
		var loader_container = new Element('div', {'id' : 'closecont','style' : 'z-index:3000; position:absolute;width:22px;height:22px;margin-top:-21px;'}).show();
		var dialog = new Element('div', {'class':'imageContainer','style' : 'position:absolute;'}).show();
		var newIframe = new Element('IFRAME', { 'id':'videoIframe','scrolling':'no', 'frameborder':'no','style' : 'width:575px; height:345px; overflow:hidden; border:0px;z-index:3600;'})			

			target_array.each(function(s, index){		
			var checkvideo = s.href.split('.');			
				if(checkvideo[checkvideo.length-1]=='flv'){
					targetIDdiv = s.name;
				$(targetIDdiv).onclick = function(){
				//alert('video');
				dialog.innerHTML="";
				//dialogHolder.insert(overLay);
				dialogHolder.insert(dialog);close_container.insert(close_bt);dialog.insert(close_container);dialog.insert(loader_container);loader_container.insert(loader);
				newIframe.src='http://www.storyboards.nl/cmx_videoplayer.asp?file=' + s;

				//alert(s);
				dialog.insert(newIframe);
				//alert(s + 'this is a video');
				close_bt.onclick = function(){
				dialog.remove(newIframe);
				dialog.hide();
				showimg.hide();
			}
			close_bt.onclick = function(){
				dialog.hide();
				dialog.innerHTML="";
			}
			return false;
			    }
 
			}else{
			this.image=target_array[index].href;
			if($('videoIframe')){
				dialog.remove(newIframe);
				 }
				//s.href = '#';
			target_array[index].onclick = function(){
			//browser_size_array = getBrowserSize();
			var browserDims = getBrowserSize();
			brWidth = browserDims[1];
			brHeight = browserDims[0];
		    
			
			dialogHolder.insert(dialog);
			dialog.innerHTML="";
			close_container.insert(close_bt);dialog.insert(close_container);dialog.insert(loader_container);loader_container.insert(loader);
			//showimg.show();			

			dialog.insert(showimg)
			dialog.hide();
			showimg.src='';

			showimg.src=this.href;
			showimg.alt=s.readAttribute('title');
			showimg.title=s.readAttribute('title');
			var imageDims = showimg.getDimensions();
			imgWidth = imageDims.width;
			imgHeight = imageDims.height;
			
			//alert(imgWidth + ' | ' + imgHeight + ' | ' + brWidth + ' | ' + brHeight)
			showimg.onclick = function(){
				dialog.hide();
			}
			close_bt.onclick = function(){
				dialog.hide();
			}
			//varIndex=(index);
			return false;
			};
			}

			//showimg.onmouseover = function(){ new Effect.Appear(navBar, { duration: 0.5,  to: 1 });}
		})
			Event.observe(showimg, 'load',  function(event) {	
							showimg.show();
							dialog.show();
							//$('id_of_element').fade({ duration: 3.0, from: 0, to: 1 });
							//Effect.Fade(dialog, { duration: 3.0 });


							imagesSize = showimg.getDimensions();
							//alert(imagesSize.width);	
							centerDiv(dialog,showimg,close_container);
							loader_container.hide();
	
		}); 
		Event.observe(newIframe, 'load',  function(event) {	
							newIframe.show();
							dialog.show();
							//$('id_of_element').fade({ duration: 3.0, from: 0, to: 1 });
							//Effect.Fade(dialog, { duration: 3.0 });


							imagesSize = showimg.getDimensions();
							//alert(imagesSize.width);	
							centerDiv(dialog,newIframe,close_container);
							loader_container.hide();
	
		}); 
	}	
	}	
			var centerDiv = function(elt,theimg,closecont){
			browser_size_array = new Array();
			browser_size_array = getBrowserSize();
			var eltDims     = theimg.getDimensions();
			var browserDims = $(document.body).getDimensions();

			var y  = ((browserDims.height/2) - (eltDims.height/2))/2;
			var x = ((1150 - eltDims.width) / 2)+220;

			if (self.pageYOffset) y=y;

			closecont.style.marginLeft = eltDims.width-1 + 'px';

			elt.style.top = y+scrollDistance() +200+'px';
			if(browserDims.width > eltDims.width + x){
			elt.style.left = x+'px';
			}else{
			elt.style.left = browserDims.width - (eltDims.width + 50 )+ 'px';
			//alert(browserDims.width + ' | ' + eltDims.width + elt.style.left);
			}

		}
	var scrollDistance = function(){
		if (self.pageYOffset) return self.pageYOffset;//ff
		if (document.documentElement && document.documentElement.scrollTop)//
        return document.documentElement.scrollTop;// Internet Explorer 6 - standards mode
		if (document.body.scrollTop) return document.body.scrollTop;// Internet Explorer 6, 7 and 8
        return 0;
	}


	
	var selectMenu={
		load: function() {
			var selectMenu1 = new Element('div', {'id' : 'selectMenu1','style' : 'position:absolute;','class' : 'flexcroll'}).hide();
			var selectMenu2 = new Element('div', {'id' : 'selectMenu2','style' : 'position:absolute;','class' : 'flexcroll'}).hide();
			var breaker1 = new Element('div', {'style' : 'clear:both;'}).show();
			var breaker2 = new Element('div', {'style' : 'clear:both;'}).show();
			var menu1 = $('selectedOption').hide();
			var menu2 = $('selectedOption2').hide();
			if($('selectedOption3')){
			var selectMenu3 = new Element('div', {'id' : 'selectMenu3','style' : 'position:absolute;height:50px;','class' : 'flexcroll'}).hide();
			var breaker3 = new Element('div', {'style' : 'clear:both;'}).show();
			var menu3 = $('selectedOption3').hide();
			var option_array3 =  $$('#selectedOption3 .selectOptions');
			}
			var option_array =  $$('#selectedOption .selectOptions');
			var option_array2 =  $$('#selectedOption2 .selectOptions');
			//alert(option_array);
			option_array.each(function(s, index){
			 	atag = new Element('a', {'href' : '/artists/'+ s.value.replace(' ','') + '/','class' : 'selectOption'});
				atag.innerHTML = s.innerHTML;
				selectMenu1.insert(atag);
						  });
			option_array2.each(function(s, index){
			 	atag = new Element('a', {'href' : '/gallery/'+ s.value.replace(' ','') + '/','class' : 'selectOption'});
				atag.innerHTML = s.innerHTML;
				selectMenu2.insert(atag);
						  });
			if($('selectedOption3')){
			option_array3.each(function(s, index){
			 	atag = new Element('a', {'href' : 'javascript:void(0)','onclick' : 'document.getElementById(\'selectlangby\').value=\'' + s.value + '\';checkmail(document.getElementById(\'selectlangby\'));','class' : 'selectOption'});
				atag.innerHTML = s.innerHTML;
				selectMenu3.insert(atag);
						  });
			//alert(menu3.parentNode);
			menu3.parentNode.appendChild(selectMenu3);
			selectMenu3.insert(breaker3);
			}
			menu1.parentNode.appendChild(selectMenu1);
			menu2.parentNode.appendChild(selectMenu2);
			selectMenu1.insert(breaker1);
			selectMenu2.insert(breaker2);
			//selectItemContainer.hide();	
			Event.observe(document.body, 'click', function(event) {
 			  var element = Event.element(event);
 			  if ('selectbt1' != element.id && 'selectMenu1_vscrollerbar' != element.id && 'selectMenu1_vscrollerbarend' != element.id && 'selectMenu1_vscrollerbarbeg' != element.id && 'selectbt2' != element.id && 'selectMenu2_vscrollerbar' != element.id && 'selectMenu2_vscrollerbarend' != element.id && 'selectMenu2_vscrollerbarbeg' != element.id && 'selectbt3' != element.id && 'selectMenu3_vscrollerbar' != element.id && 'selectMenu3_vscrollerbarend' != element.id && 'selectMenu3_vscrollerbarbeg' != element.id){
   			  selectMenu1.hide();
   			  selectMenu2.hide();
			if($('selectedOption3')){
   			  selectMenu3.hide();
			}
			  }else{
			  }

			});
		}				

	}


	var entsub = function(element) {
	if (window.event && window.event.keyCode == 13)
	location.href='/gallery/' + element.value.replace(' ','/');
	else
    return true;}	
	var toggleSelect = function(target){
		if($(target).offsetHeight==0){
			$(target).show();
		if(target=='selectMenu1')fleXenv.fleXcrollMain("selectMenu1");
		if(target=='selectMenu2')fleXenv.fleXcrollMain("selectMenu2");
		if(target=='selectMenu3')fleXenv.fleXcrollMain("selectMenu3");
			
		}else{
			$(target).hide();
		}
	}	
	var initBrowserHeight = {
		load:function(){				
			//alert($('browserheight').clientHeight)
			if($('galleryContent')!=null){
			$('content').style.height = $('galleryContent').clientHeight + 'px';
			$('galleryContent').style.height = $('browserheight').clientHeight-190 + 'px';
			$('maincontent').style.height = $('content').clientHeight-190 + 'px';
			$('categories').style.top = $('content').clientHeight + 250 + 'px';
			$('content').onmouseover=function(){
				if(!$('videoIframe')){
				//document.body.style.overflow = 'hidden';
					 }
			}
			$('content').onmouseout=function(){
				//document.body.style.overflow = 'auto';
			}
			}
			if($('contentNews')!=null){
			theClientHeight = $('contentNews').clientHeight;
			$('content').style.height = $('contentNews').clientHeight+190 + 'px';
			$('contentNews').style.height = theClientHeight + 'px';
			$('maincontent').style.height = theClientHeight + 'px';
			$('categories').style.top = $('contentNews').clientHeight + 450 + 'px';
			//alert($('contentNews').clientHeight+140);
			//Effect.ScrollTo('newsSlider',  {axis:'y',offset:20 } ); 
			//alert($('newsSlider').clientX);

			}
			if($('contentStudio')!=null){
			$('content').style.height = $('contentStudio').clientHeight + 40+ 'px';
			$('contentStudio').style.height = $('contentStudio').clientHeight-300 + 'px';
			$('maincontent').style.height = $('contentStudio').clientHeight + 'px';
			$('categories').style.top = $('contentStudio').clientHeight + 800 +  'px';
			//alert($('bottomcont').offsetTop)

			}
			if($('contentInfo')!=null){
			$('content').style.height = $('contentInfo').clientHeight + 40+ 'px';
			$('contentStudio').style.height = $('contentInfo').clientHeight-300 + 'px';
			$('maincontent').style.height = $('contentInfo').clientHeight + 'px';
			$('categories').style.top = $('contentInfo').clientHeight + 900 + 'px';
			//alert($('bottomcont').offsetTop)

			}
		}
	}
    var  scroll = {  
	
    newsSlider: function(event) { 
	if($('theLink')){
		target=($('theLink').innerHTML).split(' &gt; ')[1];
		theAtag=$$('a');
		counterWidth = 0;
		for (n=0;n<theAtag.length;n++){
			if(theAtag[n].name!=''){
				counterWidth++;
			//$('debug').innerHTML = $('debug').innerHTML + '<br/>' + theAtag[n].name + ' | ' + target;
			}
			if(theAtag[n].name==target.replace(' &gt;','')){
				//alert($('newsSlider').scrollLeft);
				//scrollTarget = Position.cumulativeOffset(theAtag[n]);
			$('newsSlider').scrollLeft += (counterWidth*164)-370;

			}
		}
		//$('newsSlider').scrollTo(new Effect.ScrollTo('footer'););
		} 
	}
    }  
	Event.observe(window, 'load', function() {
	slideMenu.load();selectMenu.load();getImage.load();initBrowserHeight.load();scroll.newsSlider();if($('mycustomscroll2'))fleXenv.fleXcrollMain("mycustomscroll2");
	});	
	Event.observe(window, 'resize', function() {
	//initBrowserHeight.load();
	});	

-->
