$(function () {
	$('.promo_rotate_static div').hide ();
	var promo_count = $('.promo_rotate_static div').length;
	var pick = Math.floor (Math.random () * promo_count);
	if( promo_count > 0 ) $($('.promo_rotate_static div')[pick]).show ();
});

function setLeftRightWidth() {
	if(window.leftRightWidth) {
		$("div.left_half").each(function(i){
			if(i < leftRightWidth.length){ // Check to see if a custom width has been defined for this DIV
				if(leftRightWidth[i][0]<=100) { // Only apply left width if it is less than or equal to 100
					$(this).width(leftRightWidth[i][0]+"%");
				}
			}
		})
		$("div.right_half").each(function(i){
			if(i < leftRightWidth.length){ // Check to see if a custom width has been defined for this DIV
				if(leftRightWidth[i][0]<=100) { // Only apply right width if the left width is less than or equal to 100
					if(leftRightWidth[i][0]+leftRightWidth[i][1]>100) { // If sum of the left and right widths is greater than 100 adjust right width
						leftRightWidth[i][1]=100-leftRightWidth[i][0];
					}
					$(this).width(leftRightWidth[i][1]+"%");
				}
			}
		})
		//equalHeightLR();
	}
}

// getParams *******************************************************************
function getParams(params) {
   var Params = new Object ();
   if ( ! params ) return Params; // return empty object
   var Pairs = params.split(/[;&]/);
   for ( var i = 0; i < Pairs.length; i++ ) {
      var KeyVal = Pairs[i].split('=');
      if ( ! KeyVal || KeyVal.length != 2 ) continue;
      var key = unescape( KeyVal[0] );
      var val = unescape( KeyVal[1] );
      val = val.replace(/\+/g, ' ');
      Params[key] = val;
   }
   return Params;

}
// end getParams *****************************************************************

