/***************************
	Place onload functions here
****************************/
window.onload = function(){
	document.onclick = function(){
		if (document.getElementById("selectBoxHeader") != null) {
			hideSelectBox();
		}
	}
	
	if (document.getElementById("selectBoxHeader") != null) {
		document.getElementById("selectBoxHeader").onclick = function(oEvent){
			var oEvent = (typeof oEvent != "undefined")? oEvent : event;
			oEvent.cancelBubble = true;
			if(oEvent.stopPropagation){
				oEvent.stopPropagation();
			}
			showSelectBox();
		}
	}
	
	//should we shuffle the images?
	if(document.getElementById("slideShow") != null){
		if(true == bRandomize){
			//shuffle the images for first page
			shuffle(100);
			
			//start the timer
			slideShow(posInArrayTest);
		}
	}
	
	//var timer = setTimeout("slideShow(posInArrayTest)",50);
	
	//check if something should scroll
	checkForScroll();
	
	//add next/prev vents for studio items
	
	var NextPrevStudioItem = document.getElementById("NextPrevStudioItem")
	if(NextPrevStudioItem != null)
	{

		NextPrevStudioItem.onclick = function(){
			IggStudioCategory_ExecuteAsync("next");
			return false;
		}

		document.getElementById("PrevStudioItem").onclick = function(){
			IggStudioCategory_ExecuteAsync("prev");
			return false;
		}
	}
	
	//attach contact form event
	if(document.getElementById("validationSummary") !=null){
		document.forms[0].onsubmit = function(){
			
			return validateForm();
		}
	}
	
	//init application menu
	if(document.getElementById("applicationList") !=null){
		InitApplicationList();
	}
	
}