function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

var url = gup( 'url' );
var form = gup( 'form' );


if(form == 'formtest'){

var action = gup( 'action' );
var manufacturer = gup( 'manufacturer' );
var cat = gup( 'cat' );
var load = gup( 'load' );

	var urlnew = unescape(url.replace(/\+/g, " "));

	var urlnew = urlnew+'?action='+action+'&manufacturer='+manufacturer+'&cat='+cat+'&load='+load;
	var theLocation = window.location.hash;
	theLocation = urlnew;
	document.getElementById('motoringIframe').src = theLocation;

}
else if(url !== ''){

	var urlnew = unescape(url.replace(/\+/g, " "));
	var theLocation = window.location.hash;
	theLocation = urlnew;
	document.getElementById('motoringIframe').src = theLocation;
}


