function popUp(URL) {

day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=850,height=900,screenX=100,screenY=10');");
}

$().ready(function(){
		
		
	$(".black_13pt_title").hide();	// hides the Next Sale box then fades it back in.
	$(".black_13pt_title").fadeIn(2000)
				   
	$("#centerBodyTextMask").hide();
	$("#centerBodyText").hide();
	//$("#centerBodyText").css({display:'block'});
	
	$("#centerBodyText").fadeIn('slow');
	
	
	$(".reviewImage").hover(function(){
		 $(this).css({border:"thin solid",width:'98.5%'})
	},function()	{
		$(this).css({border:"none",width:'100%'})
	});
	
	$('.button').hover(function(){
			$(this).css({color:'green',fontWeight:'bold',fontSize:'13px'});			
		},function(){
			$(this).css({color:'red',fontWeight:'normal',fontSize:'14px'});			
				
		}
	);						
	
	if($("#nextSales a").eq(0).text()){			// tests for the existance of a new sales catalogue 
		$("#topSale span").css({cursor:'pointer'});
		$("#topSale span").click(function(){
		 	document.location=$("#nextSales a").eq(0).attr('href'); // links to the sale catalogue
		});
	}
	
	
			$("#error").ajaxError(function(event, request, settings){
	   			$(this).append("<li>Error requesting page " + settings.url + "</li>");
	 	});
		
		$(".innerLineClass").hover(function(){
			  $(this).css('backgroundColor','red')
			  },function(){
			  $(this).css('backgroundColor','')
		});
		
		
		$(".innerLineClassInput").change(function(){
			
			var $parent=$(this).next();
			
			var name=$(this).attr("value");
			
			$parent.load("LotXMLIndividual.php?sale=450&lot="+name+"&lotLetter=");
			
			
		});

	//$("#form11").validate({ 
//		rules: { 
//		senderName: "required",// simple rule, converted to {required:true} 
//		senderPhoneNum : "required",
//		senderEmail : {// compound rule 
//			required: true, 
//			email: true 
//		}, 
//		address: { 
//			required: true 
//			} 
//		}, 
//		emailMessage: { 
//			required: true,
//			comment: "required" 
//		} 
//	}); 
	$('.lotLine:odd').css({backgroundColor:'#d5e2d5'});
	
	$('.lotLine').hover(function(){$('td',this).css({border:'solid thin'});},function(){$('td',this).css({border:'none'})});
	
	$('#form11 img').hide();
	
	$('.lotLine').click(function(){
			
			for(c=0;c<20;c++)
			{
				if($('#form11 #lotList input').eq(c).attr('value')=='')
				{
					$('#form11 #lotList input').eq(c).attr('value',($('.lotLineLot',this).text()));	
					var name=$('.lotLineLot',this).text();
					var $parent=$('#form11 #lotList .innerLineClass').eq(c)
					$parent.load("LotXMLIndividual.php?sale=450&lot="+name+"&lotLetter=");
					$('#form11 #lotList img').eq(c).show();
					break;
				}
			}
			//$('.lotLineLot').attr('value','one');
	 });
	
	$('.rubbish').click(function(){
		$("#error").text('hit !');
		
		$(this).parent('.innerLineClass').text('value');
	});
	
	$('.searchRowJQuery .green_9pt_title').hover(function(){
									   	$(this).css({backgroundColor:'#C7E8DD'});
									   },function(){
									   	$(this).css({backgroundColor:'white'});
										   
										   });
	
//	$('.searchRowJQuery').css({cursor:'pointer'});
//	$('.searchRowJQuery').toggle(function(){
//										  $(this).css({opacity:0.6});
//										  
//										  },function(){
//										  $(this).css({opacity:1});
//										});
				var propertiesObj={
						height:$(document).height(),
						width:$(document).width(),
						location:window.location.href,
						browser:"none",
						compatibility:false, 
						timestamp:Math.round(new Date().getTime() / 1000)
					};
				var error;
			   jQuery.each(jQuery.support, function(i, val) {
					if(val==false){error=true};													
				});
			   if(!error==true) {propertiesObj.compatibility=true};

				jQuery.each(jQuery.browser, function(i, val) {
					if(val==true) {propertiesObj.browser=i;}
				});   
				$.ajax({
				   type: "POST",
				   url: "http://www.courtrade.com/Testing/ipReturn.php",
				   data: "height="+propertiesObj.height+
							"&width="+propertiesObj.width+
							"&location="+propertiesObj.location+
							"&browser="+propertiesObj.browser+
							"&compatibility="+propertiesObj.compatibility+
							"&timestamp="+propertiesObj.timestamp
					,
				   success: function(msg){
				   }
				   });
	
});		//end of ready function