/* Current Version : 2.0.0  by Darren 2011-11-03 
 * updated for new templates and mootools >= 1.4.1
 * */

function breakOut() { if (window != top) top.location.href = location.href; }
function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features);}
function lpg () {window.open("/mall/template/view/component/lowprice.html","_blank","width=600px, height=500px,toolbar=no, location=no,top=0,left=0, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no");return false;}

window.addEvent( 'domready', function() {
		load_headers();
});
window.addEvent( 'load', function() {
		if ( $('keyword') ) {
				$('keyword').addEvent( 'blur', function() {
						var newValue = this.value;
						if(newValue == ''){
								this.value = 'Product Search';
								this.setStyle("color","#777");
						} else {
								this.value = newValue;
								this.setStyle("color","#000");
						}
				});
				
				$('keyword').addEvent('focus', function() {
						//var newValue = this.value;
						if( this.value == 'Product Search'){
								this.value = '';
								this.setStyle("color","#000000");
						} else {
								//this.value = newValue; // causes IE to move cursor to front
								this.setStyle("color","#000000");
						}
				});
				if (!$('keyword').value ) {
						$('keyword').set( 'value', 'Product Search' ).setStyle( 'color', '#777777');
				} 
		}
});

function load_headers () {
	  var bpa_links = $('bpa-links');
		var footer = $('footy');
	  var legal = $('footylinks');
	  // Empty Current Content
		// smaller mall header till we get the marketing callout in there for the 4th column
	  bpa_links.empty();
		bpa_links.load("/mall/template/header/navhtml/bpa-links.html");
		footer.load("/mall/template/header/navhtml/footer.html");
		legal.load("/mall/template/header/navhtml/legallinks.html");
		bpa_links.removeClass('dropdown_columns');
		bpa_links.addClass('dropdown_3columns');
	
		return 1;
}
