// JavaScript Document


	  

function enableSubmit(){
	$('#box_nav_work_submitBttn').attr("disabled", "");
}
				
	
	function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function ___getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};

function loadingScreen(){
	var sizes = getPageSize();
	
	$('body').css('overflow', 'hidden');
	$('#box_loading').css('width', sizes[0]);
	$('#box_loading').css('height', sizes[1]);
	$('#box_loading').css('display', 'block');
	
	
	var copy = new Array();
	
copy[0] = "Norem Ipsum" ;
copy[1] = "Campbell Mithun" ;
copy[2] = "BBDOHot Dish" ;
copy[3] = "Carmex" ;
copy[4] = "I do not have access to the the safe" ;
copy[5] = "Zaaz" ;
copy[6] = "Microsoft" ;
copy[7] = "Albeto-Culver" ;
copy[8] = "Northwest Airlines" ;
copy[9] = "Nothing But Noodles" ;
copy[10] = "Nothing but Noodles actually feature many noodle-less items" ;
copy[11] = "Foremost Buildings" ;
copy[12] = "Coca Cola" ;
copy[13] = "Rodgers Townsend" ;
copy[14] = "Bloomington Tourism/Mall Of America" ;
copy[15] = "John, pay attention to Dad" ;
copy[16] = "Because it's time to brush up your business skills." ;
copy[17] = "The Hartford" ;
copy[18] = "Bolin Marketing and Knock" ;
copy[19] = "Indoor Light at its most natural." ;
copy[20] = "St Louis Children's Hospital" ;
copy[21] = "Best Buy" ;
copy[22] = "What do you call a breadless sandwich? Is it even a sandwich anymore if there's nothing being sandwiched?" ;
copy[23] = "Carlson Marketing" ;
copy[24] = "Buffalo Wild Wings" ;
copy[25] = "Aveda" ;
copy[26] = "Fine persian rugs will envy the doormat." ;
copy[27] = "H&R Block" ;



	loopBreaker = 20;
	if (sizes[0] < 1100){
		loopBreaker = 12;
	} 
		
	
	for (i in copy){
		timeOffset = i * 75;
		
		
		itemOffset = Math.floor(Math.random()*(copy.length - 1))
		setTimeout("loading_addtext('" + escape(copy[itemOffset]) + "')", timeOffset);
		
		if (i == loopBreaker){
			break;
		}
	}
	
	i++;
	timeOffset = i * 75;
	setTimeout("hideLoading()", timeOffset );
	
	
	
	//$('#box_loading').css('display', '');
}

function loading_addtext(copy){

	
	var finalOutput = '<h5>' + $('#box_loading').text() + '<span style="color:#f36f36">' + unescape(copy) + '</span>&nbsp;</h5>';
		$('#box_loading').html(finalOutput);
}

function hideLoading(){
	$('#box_loading').fadeOut('slow');
	$('body').css('overflow', 'auto');
}