$(document).ready(function(){
	if ($("#info").html()) $("#info").show();
	if ($("#error").html()) $("#error").show();
	$("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank"); 
	$("*").live("contextmenu",function(e){return false;});   

	$(".error").live("focus",function(){$(this).removeClass("error");});
	
	$('.ebay').cycle({ 
		fx:      'scrollLeft', 
		speedIn:  1000, 
		speedOut: 500, 
		delay:   5000,
		next:   '.next', 
		prev:   '.prev',
		pause:	1
		});
	});
	
	
function ispostcode(postcode){
	var re = new RegExp('^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$');
		if (postcode.match(re)) {
		return true;
	} else {
		return false;
	}
}

/* code to handle cookies */
/* code to handle cookies */
function set_cookie(c_name,value){
	var path = "/";
	var expiredays = 999;
	var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+
((expiredays==null)?"":";expires="+exdate.toUTCString()+";path=" + path);
}
function get_cookie(c_name){
	if(document.cookie.length>0)
	{c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1)
	{c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
	return"";
}

