function rewritePrintHref(){
	
	var startParam = "";
	
	$('#googlematerialsearch').load(function(){

		var iframeLocation = "";
		
		{
			iframeLocation = "" + this.contentWindow.location;
		}
		
		
		if (iframeLocation == null){
			var iframeLocation = jQuery('#googlematerialsearch').contents().find('.back').attr('href');
		}
		
		var resultOffset = 0;
		
		jQuery.each(iframeLocation.split('&'), function(){
			var key = this.split('=')[0];
	        var val = this.split('=')[1];
	        if(key=='start'){
	        	resultOffset = parseInt(val);
	        }
		});
		
		startParam = resultOffset;
		
	});

	
	$('#printLink').click(function () {

		var linkElement = $('#printLink');
		var originalUrl = linkElement.attr('href');
		
		var newUrl = "";
		var isStartSet = false;
		var first = true;
		
		jQuery.each(originalUrl.split('&'), function(){
			var key = this.split('=')[0];
	        var val = this.split('=')[1];
	        if (first){
	        	newUrl= key + "=" + val; 
	        	first = false;
	        }else if(key=='start'){
	        	newUrl = newUrl + "&" + key + "=" + startParam;
	        	isStartSet = true;
	        }else{
	        	newUrl = newUrl + "&" + key + "=" + val;
	        }
		});
		
		if (!isStartSet) {
			newUrl = newUrl + '&start=' + startParam;
		}
		
		linkElement.attr('href', newUrl);
		
	});
	
}