/*@cc_on @*/
/*@if (@_win32)
document.execCommand('BackgroundImageCache', false, true);
/*@end @*/
$(document).ready(function() {
	  $('a').click(function() {
        this.blur();
      });
});

$(document).ready(function() {
	  $("a[@rel='print']").click(function() {
			return !window.print();
	});
});	

$(document).ready(function(){


	$(".focusinput").blur(function(){
            if($(this).attr('value') == '' || $(this).attr('value') == null)
            {
                var dom = ($(this).get())[0];
                $(this).attr('value', dom.defaultValue);
		$(this).css("color","#b1b1b1");
            }
        });
        
        $(".focusinput").focus(function(){
            var dom = ($(this).get())[0];
            if($(this).attr('value') == dom.defaultValue)
            {
                $(this).attr('value',  "");
		$(this).css("color","#000000");
            }
        });
        
	$("#search-form").submit(function(){
            var dom = ($("#search-box").get())[0];
            if($("#search-box").attr('value') == '' || $("#search-box").attr('value') == dom.defaultValue)
            {
                dom.focus();
                return false;
            }
            return true;
        });

	$("#productsearch").submit(function(){
            var dom = ($("#psearch-box").get())[0];
            if($("#psearch-box").attr('value') == '' || $("#psearch-box").attr('value') == dom.defaultValue)
            {
                dom.focus();
                return false;
            }
            return true;
        });
        
        
$("#sf-3").focus(function() {
	if (this.value == "Enter keyword") {
		this.value = "";
	}
	});
$("#sf-3").blur(function() {
	if (this.value == "") {
		this.value = "Enter keyword";
	}
	});

$("a.new").each(function(){
		$(this).click(function(){
			window.open($(this).attr('href'));
			return false;
		});	
	});
	
});

btnMain = new Image();
btnMain.src = "http://www.experian.co.uk/www/images/btn_main_offer_nounderline.gif";
btnMainUnderline = new Image();
btnMainUnderline.src = "http://www.experian.co.uk/www/images/btn_main_offer_underline.gif";
function swapBtnMain(){
    theImg=document.getElementById("btnMain");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/btn_main_offer_underline.gif");
}
function restoreBtnMain(){
    theImg=document.getElementById("btnMain");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/btn_main_offer_nounderline.gif");
}

btn2Main = new Image();
btn2Main.src = "http://www.experian.co.uk/www/images/MainButton.gif";
btn2MainUnderline = new Image();
btn2MainUnderline.src = "http://www.experian.co.uk/www/images/main-button-hover.gif";
function swapBtn2Main(){
    theImg=document.getElementById("btn2Main");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/main-button-hover.gif");
}
function restoreBtn2Main(){
    theImg=document.getElementById("btn2Main");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/MainButton.gif");
}

Secondary1 = new Image();
Secondary1.src = "http://www.experian.co.uk/www/images/2ndAd1Button.gif";
Secondary1Underline = new Image();
Secondary1Underline.src = "http://www.experian.co.uk/www/images/2ndAd1Button-line.gif";
function swapSecondary1(){
    theImg=document.getElementById("Secondary1");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/2ndAd1Button-line.gif");
}
function restoreSecondary1(){
    theImg=document.getElementById("Secondary1");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/2ndAd1Button.gif");
}

Secondary2 = new Image();
Secondary2.src = "http://www.experian.co.uk/www/images/2ndAd2Button.gif";
Secondary2Underline = new Image();
Secondary2Underline.src = "http://www.experian.co.uk/www/images/2ndAd2Button-line.gif";
function swapSecondary2(){
    theImg=document.getElementById("Secondary2");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/2ndAd2Button-line.gif");
}
function restoreSecondary2(){
    theImg=document.getElementById("Secondary2");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/2ndAd2Button.gif");
}

Secondary1CON = new Image();
Secondary1CON.src = "http://www.experian.co.uk/www/images/2ndAd1ButtonCON.gif";
Secondary1CONUnderline = new Image();
Secondary1CONUnderline.src = "http://www.experian.co.uk/www/images/2ndAd1Button-lineCON.gif";
function swapSecondary1CON(){
    theImg=document.getElementById("Secondary1CON");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/2ndAd1Button-lineCON.gif");
}
function restoreSecondary1CON(){
    theImg=document.getElementById("Secondary1CON");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/2ndAd1ButtonCON.gif");
}

Secondary2CON = new Image();
Secondary2CON.src = "http://www.experian.co.uk/www/images/2ndAd2ButtonCON.gif";
Secondary2CONUnderline = new Image();
Secondary2CONUnderline.src = "http://www.experian.co.uk/www/images/2ndAd2Button-lineCON.gif";
function swapSecondary2CON(){
    theImg=document.getElementById("Secondary2CON");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/2ndAd2Button-lineCON.gif");
}
function restoreSecondary2CON(){
    theImg=document.getElementById("Secondary2CON");
    theImg.setAttribute("src","http://www.experian.co.uk/www/images/2ndAd2ButtonCON.gif");
}