//var HTTP_SERVER = new String('http://development.solutionbuilt.com/harrison');
var HTTP_SERVER = new String('http://www.harrisoncontracting.com');
//var HTTP_SERVER = document.URL.replace(/(\\|\/)[^\\\/]*$/, '/');

var logs = false;
var caseStudies_timeout, caseStudies_interval, news_timeout, news_interval;
var inputvalue = [];

//External Interface calls from flash
//bool that indicates js is ready for flash
var jsready = false;
//Methods
//flash calls this  to check the jsready value is set to true
function isReady() {
	
	jsready = true;
	return jsready;
}
//get called in onLoad to establish the .swf object
function doID (swfID) {
	
	 if(navigator.appName.indexOf("Microsoft") != -1){
		me = window[swfID];
	 }else{
		me = document[swfID];
 }
	
}
//flash sends params to this method
function getJsParam(paramA,paramB) {
	var page = new String('');
	//alert("image: " + paramA + "::: paramB: " + paramB);
	switch (paramA) {
	case 'image0':
		page = 'request-a-quote';
		break;
	case 'image1':
		page = 'commercial';
		break;
	case 'image2':
		page = 'facility-maintenance';
		break;
	case 'image3':
		page = 'residential';
		break;
	case 'image4':
		page = 'industrial';
		break;
	}
	$.historyLoad(page);
}

function setLinks() {
	if(logs)console.log('set links');
	$('a').click(function(){
		var url = this.href;
		if(
				url!='http://remote.harrisoncontracting.com/Remote/'&&
				url!='https://remote.harrisoncontracting.com/owa'&&
				url!='http://harrisoncontracting.blogspot.com/'&&
				url!='http://www.facebook.com/pages/Villa-Rica-GA/Harrison-Contracting-Co/280564415512'&&
				url!=HTTP_SERVER+'/'&&
				!$(this).parent().hasClass('newsletter')&&
				!$(this).parent().hasClass('ignore')&&
				url.indexOf('.pdf')==-1&&
				url.indexOf('mailto:')==-1
			) {
			var page = getLinkId(url);
			if(logs)console.log('convert: '+page);
			$(this).attr('href',"#"+page);
			$.historyLoad(page);
		}
    });
	//$('#lightview #content a[href*="'+HTTP_SERVER+'"], #cluetip a[href!="#"]').livequery('click',function() {
	$('#lightview #content a[href*="'+HTTP_SERVER+'"]').livequery('click',function() {
		var url = this.href;
		if (
				url!='http://remote.harrisoncontracting.com/Remote/'&&
				url!='https://remote.harrisoncontracting.com/owa'&&
				url!='http://harrisoncontracting.blogspot.com/'&&
				url!='http://www.facebook.com/pages/Villa-Rica-GA/Harrison-Contracting-Co/280564415512'&&
				url!=HTTP_SERVER+'/'&&
				!$(this).parent().hasClass('newsletter')&&
				!$(this).parent().hasClass('ignore')&&
				url.indexOf('.pdf')==-1&&
				url.indexOf('mailto:')==-1
		) {
			var page = getLinkId(this.href);
			if(logs)console.log(page+" "+location.href+page);
			$(this).attr('href',"#"+page);
			$.historyLoad(page);
		}
	});
}

function lightviewShow() {
	$('#lightview,#mask').removeClass('hidden');
	$('#mask').animate({opacity:0.7},200);
	$('#lightview').animate({opacity:1.0},200);
}

function getPage(page) {
	//if(logs)console.log('getPage: '+page);
	loadContent();
    function loadContent() {$('#lightview #content').load(page+'/ajax',showNewContent())}
    function showNewContent() {
    	//if(logs)console.log("next:"+page);
		$('html, body').animate({scrollTop:0}, 'fast');

		//Get the screen height and width
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();
	
		//Set height and width to mask to fill up the whole screen
		$('#mask').css({'width':maskWidth,'height':maskHeight});
		lightviewShow();
		
		if(page=='about2') {$('#content').removeClass().addClass('about');}
		else {$('#content').removeClass().addClass(page);}
		caseStudies_clearInterval();
		
		setTimeout(function() {caseStudies_check();setInputs();$('#lightview form').submit(function() {submitMessage();return false;});},500);
		//if(logs)console.log(page+' this is here');
	}
    function caseStudies_check() {
    	
    	if( $('#case-studies').length > 0 ) caseStudies_init();
    	/*
		if ( $('#case-studies').livequery(function(){
			return $('#case-studies').length
		}) ) alert('yee');
		*/
    }
}

/*
(function($){
	$.vari = "$.vari";
	$.fn.vari = "$.fn.vari";
	
	// $.fn is the object we add our custom functions to
	$.testing = $.fn.testing = function() {
		return this.each(function(){
			alert(this.vari);    // would output `undefined`
			alert($(this).vari); // would output `$.fn.vari`
		});
	};
})(jQuery);
*/

jQuery.fn.enterToTab = function() {
	this.keypress(function(e){
		var inputs = $(this).parents("form").eq(0).find("input,select");
		var idx = new Number( inputs.index(this) );
		
		if ( e.which == 13 && ( $(this).attr('type') == 'submit' || $(this).attr('type') == 'image' ) ) return true;
		if ( e.which == 13 ) {
			if(logs)console.log('tabbing: '+idx+' - '+$(this).attr('type'));
			if (idx == inputs.length - 1) {
				//inputs[0].select() // Crashes Firefox
			} else {
				idx++;
				inputs[idx].focus(); // handles submit buttons
				//inputs[idx].select(); // Crashes Firefox
			}
			return false;
		}
	});
}

jQuery.fn.nullEnter = function() {
	this.keypress(function(e){
		var inputs = $(this).parents("form").eq(0).find("input,select");
		var idx = new Number( inputs.index(this) );
		
		if ( e.which == 13 && ( $(this).attr('type') == 'submit' || $(this).attr('type') == 'image' ) ) return true;
		if ( e.which == 13 ) {
			return false;
		}
	});
}

jQuery.fn.filterNumeric = function() {
	this.keypress(function(e){
		if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57)) {
			return false;
		}
	});
}

function getLinkId(link) {
	var params = link.split('/').reverse();
	if(params[0]=='')params[0]='index';
	//if(logs)console.log('getLinkID: '+params[0]);
	return params[0].replace('#','');
}

function getLocationId(link) {
	var params = link.split('/').reverse();
	//if(params[0]=='')params[0]='index';
	//if(logs)console.log('getLinkID: '+params[0]);
	return params[0].replace('index','');
}

function pageload(hash) {
	var loc = getLocationId(location.href);
	if($.browser.msie) {hash = encodeURIComponent(hash);}
	if(loc.indexOf('.pdf') == -1) {
		if(loc.substr(0,1) != '#' && loc != '') {window.location = HTTP_SERVER+'/#'+loc}
		else if(hash == '') {
			$('#lightview,#mask').animate({opacity:0.0},500,function(){$(this).addClass('hidden')});
			flash_init();
		}
		if(hash) {getPage(hash);}
		else {$("#load").empty();}
		document.title = 'Full Service Painting, Carpentry, & Re-Imaging Specialist | Harrison Contracting Company';
	}
}

/** CASE STUDIES **/

function caseStudies_init() {
	$('#case-studies div').stop().scrollTo( '0px', 0 );
	$('.description').cluetip({
		cluezIndex: '100',
		titleAttribute: 'rel',
		splitTitle: '|', 
		sticky: true,
		activation: 'click', 
		dropShadow: false
	});
	$('#case-studies .text_here').ThreeDots({max_rows:7,ellipsis_string:' ...<br /><span>Click to Read More</span>'});
	caseStudies_setInterval();
}

function caseStudies_setInterval() {
	///*
	caseStudies_interval = setInterval(function (a,b) {
			// increment slide
		caseStudies_rotate();
		},10000);
	//*/
}

function caseStudies_setTimeout() {
	///*
	caseStudies_timeout = setTimeout(caseStudies_setInterval, 40000);
	//*/
}

function caseStudies_clearInterval() {
	clearInterval(caseStudies_interval);
}

function caseStudies_clearTimeout() {
	clearTimeout(caseStudies_timeout);
}

function caseStudies_rotate() {
	caseStudies_scrollRight();
}

function caseStudies_scrollLeft() {
	var totalElements = $('#case-studies li').length;
	var paneSize = 380;
	if ( $('#content-left #case-studies').length ) paneSize = 247;
	var maxScroll = (totalElements-1)*paneSize;
	var currentPane = $('#case-studies div#case-studies-view').scrollTop() / paneSize;
	if(currentPane % 1 != 0) {
		currentPane = Math.round(currentPane);
		$('#case-studies div#case-studies-view').scrollTop(currentPane*paneSize);
	}
	if ( $('#case-studies div#case-studies-view').scrollTop() == 0) $('#case-studies div#case-studies-view').stop().scrollTo( maxScroll+'px', 0 );
	else $('#case-studies div#case-studies-view').stop().scrollTo( '-='+paneSize+'px', 0 );
}

function caseStudies_scrollRight() {
	var totalElements = $('#case-studies li').length;
	var paneSize = 380;
	if ( $('#content-left #case-studies').length ) paneSize = 247;
	var maxScroll = (totalElements-1)*paneSize;
	var currentPane = $('#case-studies div#case-studies-view').scrollTop() / paneSize;
	if(currentPane % 1 != 0) {
		currentPane = Math.round(currentPane);
		$('#case-studies div#case-studies-view').scrollTop(currentPane*paneSize);
	}
	if ( $('#case-studies div#case-studies-view').scrollTop() >= maxScroll) $('#case-studies div#case-studies-view').stop().scrollTo( '0', 0 );
	else $('#case-studies div#case-studies-view').stop().scrollTo( '+='+paneSize+'px', 0 );
}

/** FLASH PIECE **/

function flash_init() {
	var so = new SWFObject(HTTP_SERVER+"/images/Harrison_Nav_Wheel.swf", "Harrison_Nav_Wheel", 500, 500, "8,0,0,0");
	so.addParam("scale", "showall");
	so.addParam("salign", "lt");
	so.addParam("allowScriptAccess", "always");
	so.addParam("menu", "false");
	so.addParam("wmode","transparent");
	so.write("flash_holder");
}

/** NEWS **/

function news_init() {
	$('#news div').stop().scrollTo( '0px', 0 );
	news_setInterval();
}

function news_setInterval() {
	///*
	news_interval = setInterval(function (a,b) {
			// increment slide
		news_rotate();
		},5000);
	//*/
}

function news_setTimeout() {
	///*
	news_timeout = setTimeout(news_setInterval, 5000);
	//*/
}

function news_clearInterval() {
	clearInterval(news_interval);
}

function news_clearTimeout() {
	clearTimeout(news_timeout);
}

function news_rotate() {
	news_scrollRight();
}

function news_scrollLeft() {
	var totalElements = $('#news #news-view li').length;
	var paneSize = 138;
	var maxScroll = (totalElements-1)*138;
	var currentPane = $('#news $news-view').scrollTop() / paneSize;
	if(currentPane % 1 != 0) {
		currentPane = Math.round(currentPane);
		$('#news div#news-view').scrollTop(currentPane*paneSize);
	}
	if ( $('#news div').scrollTop() >= 0) $('#news div').stop().scrollTo( maxScroll+'px', 0 );
	else $('#news div').stop().scrollTo( '-='+paneSize+'px', 0 );
}

function news_scrollRight() {
	var totalElements = $('#news #news-view li').length;
	var paneSize = 138;
	var maxScroll = (totalElements-1)*138;
	var currentPane = $('#news div#news-view').scrollTop() / paneSize;
	if(currentPane % 1 != 0) {
		currentPane = Math.round(currentPane);
		$('#news div#news-view').scrollTop(currentPane*paneSize);
	}
	if ( $('#news div').scrollTop() >= maxScroll) $('#news div').stop().scrollTo( '0', 0 );
	else $('#news div').stop().scrollTo( '+='+paneSize+'px', 0 );
}

function submitMessage() {
	$.ajax({
	    url: HTTP_SERVER+'/js_functions.php',
	    type: 'POST',
		data: $('div#content form').serialize(),
	    dataType: 'html',
	    timeout: 1000,
	    error: function(){alert('Please try again');},
	    success: function(result){
			var array = result.split('|||');
			$('#system_message').html(array[1]);
			if(array[0] == 'success') {$('#lightview form')[0].reset();}
	    }
	});
}

function setInputs() {
	$('input,textarea').each(function(i){inputvalue[i] = $(this).val();$(this).focus(function(){if ($(this).val() == inputvalue[i]) {$(this).val("");}}).blur(function(){if ($.trim($(this).val()) == "") {$(this).val(inputvalue[i]);}});});
}

$(function() {
	
	if ($('#_firebugConsole').length&&logs) logs = true;
	//doID('Harrison_Nav_Wheel');
	$.historyInit(pageload,"index");
	setLinks();
	//setInputs();
	if($('#flash_holder').length > 0) flash_init();
	if( $('#news').length > 0 ) news_init();
	
	if( $('#news').length > 0 ) {
		$('#news #news-view li .text_here').ThreeDots({max_rows:8,ellipsis_string:' ...<br /><span class="more">Click to Read More</span>'});
		//$('#news #news-view li p.ellipsis_text').ellipsis(true);
		//alert( $('#news #news-view li p').html() );
		
		/*
		$('.more').each(function(){
			$(this).attr('rel',$(this).parent().parent().attr('rel'));
		});
		*/
		
		//$('.title .more').cluetip({
		$('.title').cluetip({
			cluezIndex: '100',
			titleAttribute: 'rel',
			splitTitle: '|', 
			sticky: true,
			activation: 'click', 
			dropShadow: false
		});
		
		/*$('#news-links a').cluetip({
			  attribute: 'rel',
			  arrows: false, 
			  dropShadow: false, 
			  height: '150px', 
			  sticky: true,
			  positionBy: 'bottomTop'
			});*/

		$('#news #news-view li .ellipsis_text').cluetip({
			  cluezIndex: '95',
			  arrows: false, 
			  dropShadow: false, 
			  height: '150px', 
			  sticky: true,
			  positionBy: 'bottomTop'
			});
		
		/*
		$('#news #news-view li div .popup').click(function(){
			var text = $(this).parent().attr('title');

			//Get the screen height and width
			var maskHeight = $(document).height();
			var maskWidth = $(window).width();
		
			//Set height and width to mask to fill up the whole screen
			$('#mask').css({'width':maskWidth,'height':maskHeight});
			
			$('#dialog .content').html(text);
			$('#dialog,#mask').removeClass('hidden');
			$('#mask').animate({opacity:0.7},200);
			$('#dialog').animate({opacity:1.0},200);
		});
		*/
	}
	
	/*
	// Move into content load and livequery.
	if( $('#content-left #case-studies .description').length > 0 ) {
		
	}
	*/
	
	var maskHeight = $(document).height();
	var maskWidth = $(window).width();
	
	/*$('#lightview #close a').click(function(){
		$('#lightview,#mask').animate({opacity:0.0},500,function(){$(this).addClass('hidden')});
		document.title = 'Full Service Painting, Carpentry, & Re-Imaging Specialist | Harrison Contracting Company';
		flash_init();
		//document.title = 'Harrison Contracting Company';
		//$('#lightview,#mask').animate({opacity:0.0},1000).addClass('hidden');
		return false;
	});*/
	
	if ( $('#content.glossary').length ) {

		setTimeout(function() {
			if ( $('#content #content-right h3').length ) {
				$('#content #content-right h3:eq(2)').each(function(){
					//$(this).css('color','red');
					$(this).siblings('p:eq(5)').fadeOut(0);
					//$(this).fadeOut(0);
				});
				$('#content #content-right h3').click(function(){
					$(this).siblings().fadeIn(0);
				});
			}
			
		},500);
		
	}
	
	$('#navigation a,#close a').click(function(){
		if ( !$(this).parent().hasClass('newsletter') && !$(this).parent().hasClass('login') ) {
			$('html, body').animate({scrollTop:0}, 'fast');
	    	
			//Set height and width to mask to fill up the whole screen
			$('#mask').css({'width':maskWidth,'height':maskHeight});
			
			if (this.href!=HTTP_SERVER+'/') lightviewShow();
		}
	});
	
	$('#callout-our_projects #scrollUp, #callout-documents #scrollUp, #callout-community_involvement #scrollUp').livequery('click',function() {
		$('#callout-our_projects div, #callout-documents div, #callout-community_involvement div').stop().scrollTo( '-=200px', 800 );
	});
	$('#callout-our_projects #scrollDown, #callout-documents #scrollDown, #callout-community_involvement #scrollDown').livequery('click',function() {
		$('#callout-our_projects div, #callout-documents div, #callout-community_involvement div').stop().scrollTo( '+=200px', 800 );
	});
	
	/** CASE STUDIES **/
	
	$('#case-studies #scrollLeft').livequery('click',function() {
		caseStudies_scrollLeft();
		caseStudies_clearTimeout();
		caseStudies_clearInterval();
		caseStudies_setTimeout();
	});
	
	$('#case-studies #scrollRight').livequery('click',function() {
		caseStudies_scrollRight();
		caseStudies_clearTimeout();
		caseStudies_clearInterval();
		caseStudies_setTimeout();
	});
	
	//select all the a tag with name equal to modal
	$('input.submit').click(function(e) {
		//Get the screen height and width
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();
	
		//Set height and width to mask to fill up the whole screen
		$('#mask').css({'width':maskWidth,'height':maskHeight});
		
		//transition effect		
		$('#mask').fadeIn(0);	
	
		//Get the window height and width
		var winH = $(window).height();
		var winW = $(window).width();
              
		//Set the popup window to center
		$('#dialog').css('top',  winH/2-$('#dialog').height()/2);
		$('#dialog').css('left', winW/2-$('#dialog').width()/2);
	
		//transition effect
		$('#dialog').fadeIn(0); 
	
		//return false;
	});
	
	//$('#mask').click(function () {$('#lightview,#mask').addClass('hidden');});
});

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 wmode=\"transparent\" 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=\"wmode\" value=\"transparent\" /><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;