

function xtractFile(data){
var m = data.match(/(.*)\/([^\/\\]+)(\.\w+)$/);

if(m == null) { m = "null"; }
return {path: m[1], file: m[2], extension: m[3]}
}

jQuery(document).ready(function() 
{
        function isIE (ver) {
	        if($.browser.msie && $.browser.version == ver){
		        return true;
	        }
        }
	
	//call lightbox
	//jQuery("#newsDetails_pics a").lightBox();
	
	//png fix for IE6	
	if(isIE(6)) {
	    jQuery(document).pngFix();
	    
	} 
	
	//preload hover images
	jQuery.preload(
		 "/images/framework/next_submitBtn_on.gif", "/images/framework/enquire_submitBtn_on.gif", "/images/framework/previous_submitBtn_on.gif"
	 );
	
	//rollover function for previous & next buttons
	jQuery("img.rolloverBtns").hover(
		function()
		{
			this.src = this.src.replace("_off","_on");
		},
		function()
		{
			this.src = this.src.replace("_on","_off");
		}
	);
	
	//flash 
	if(document.getElementById("home_flash"))
	{
		var so = new SWFObject("/flash/homeFlash_001.swf", "flash_area", "688", "342", "8", "#ffffff");
		so.write("home_flash");  
	}
	
	if(document.getElementById("irelandHome_flash"))
	{
		var so = new SWFObject("/flash/irelandHomeFlash_001.swf", "flash_area", "688", "342", "8", "#ffffff");
		so.write("irelandHome_flash");  
	}
	
	if(document.getElementById("ukHome_flash"))
	{
		var so = new SWFObject("/flash/ukHomeFlash_001.swf", "flash_area", "688", "342", "8", "#ffffff");
		so.write("ukHome_flash");  
	}
	
	if(document.getElementById("usaHome_flash"))
	{
		var so = new SWFObject("/flash/usaHomeFlash_001.swf", "flash_area", "688", "342", "8", "#ffffff");
		so.write("usaHome_flash");  
	}

	if(document.getElementById("landingPage_flash"))
	{
		var so = new SWFObject("/flash/landingPage_flash_001.swf", "flash_area", "688", "342", "8", "#ffffff");
		so.write("landingPage_flash");  
	}

	
	// highlight the current link in main navigation
	if(document.getElementById("mainNav"))
	{
		var sublinks = document.getElementById("mainNav").getElementsByTagName("a");
		for(var i = 0; i < sublinks.length; i++)
		{	
			if(sublinks[i].href == document.location.href) 
			{ 
				sublinks[i].parentNode.className += " current"; 
			}	
		}
	}

	// highlight the current link in utility navigation
	
	if(document.getElementById("utilities"))
	{
		var sublinks = document.getElementById("utilities").getElementsByTagName("a");
		for(var i = 0; i < sublinks.length; i++)
		{	
			if(sublinks[i].href == document.location.href) 
			{ 
				sublinks[i].parentNode.className += " current"; 
			}	
		}
	}
	
	//highlight main navigation element while on any page in that section
	//hinde USA link
	if (document.location.href.indexOf("usa") > 0) {
		document.getElementById("hindeUSA_btn").className += " current";
	}
	//hinde UK link
	if (document.location.href.indexOf("uk") > 0) {
		document.getElementById("hindeUk_btn").className += " current";
	}
	//hinde Ireland link
	if (document.location.href.indexOf("ireland") > 0) {
		document.getElementById("hindeIreland_btn").className += " current";
	}	
	//fragrance boutique link
	if (document.location.href.indexOf("fragrance") > 0) {
		document.getElementById("fragranceBoutique_btn").className += " current";
	}
	
	disableRightClick();	
	
});
//

function disableRightClick()
{
ns6 = document.getElementById;
ns  = document.layers;
ie  = document.all;


if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=mouseDown;}
else{document.onmouseup=mouseUp;document.onmousedown=mouseDown;document.oncontextmenu=mouseDown;}

}

function mouseUp(){  

  return false;

}


//-----[mousefunction - crossbrowser ie/ns]--------//
function mouseDown(e)  // Clicking the mouse
{
  if (ie) var e=0;
  if (((document.all)&& (event.button==2)) ||  ((ns || ns6) && (e.which==2||e.which==3)))  // rightclick
    {
    	alert("Access Denied! No right click allowed.");
    	return false;

    }
   else if (((document.all)&& (event.button==1)) || ((ns || ns6) && (e.which==1)))  // left-clicking
    {   
    	
				status = "Left click detected ";
				setTimeout('status="";',400);

    } 
    
 
}//-------------[End old mousef.]-----//
