// new prototype defintion
document.include = function (url) {
 if ('undefined' == typeof(url)) return false;
 var p,rnd;
 if (document.all){
   // For IE, create an ActiveX Object instance
   p = new ActiveXObject("Microsoft.XMLHTTP");
 }
 else {
   // For mozilla, create an instance of XMLHttpRequest.
   p = new XMLHttpRequest();
 }
 // Prevent browsers from caching the included page
 // by appending a random  number
 rnd = Math.random().toString().substring(2);
 url = url.indexOf('?')>-1 ? url+'&rnd='+rnd : url+'?rnd='+rnd;
 // Open the url and write out the response
 p.open("GET",url,false);
 p.send(null);
 document.write( p.responseText );
}

function toggle_look_leftnav_arrow(obj) {
	$('arrow_productLooks').src = "/Style Library/gfx/leftnav_arrow_right.gif";
	//$('arrow_productSeries').src = "/Style Library/gfx/leftnav_arrow_right.gif";

	if ($(obj).id == 'header_productLooks' && $('productLooks').style.display == 'none')
		$('arrow_productLooks').src = "/Style Library/gfx/leftnav_arrow_down.gif";
//	else if ($(obj).id == 'header_productSeries' && $('productSeries').style.display == 'none')
//		$('arrow_productSeries').src = "/Style Library/gfx/leftnav_arrow_down.gif";

}

function toggle_leftnav_arrow(obj) {
	$('arrow_productCategories').src = "/Style Library/gfx/leftnav_arrow_right.gif";
	$('arrow_productSeries').src = "/Style Library/gfx/leftnav_arrow_right.gif";

	if ($(obj).id == 'header_productCategories' && $('productCategories').style.display == 'none')
		$('arrow_productCategories').src = "/Style Library/gfx/leftnav_arrow_down.gif";
	else if ($(obj).id == 'header_productSeries' && $('productSeries').style.display == 'none')
		$('arrow_productSeries').src = "/Style Library/gfx/leftnav_arrow_down.gif";

}

Pilgrim_isIE=document.all;
Pilgrim_isNN=!document.all&&document.getElementById;
Pilgrim_isN4=document.layers;
Pilgrim_isHot=false;

function Pilgrim_ddInit(e){
  topDog=Pilgrim_isIE ? "BODY" : "HTML";
  whichDog=Pilgrim_isIE ? document.all.Pilgrim_theLayer : document.getElementById("Pilgrim_theLayer");  
  hotDog=document.getElementById("Pilgrim_titleBar");  //event.srcElement;
  while (hotDog.id!="Pilgrim_titleBar"&&hotDog.tagName!=topDog){
    hotDog=Pilgrim_isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="Pilgrim_titleBar"){
    offsetx=Pilgrim_isIE ? event.clientX : e.clientX;
    offsety=Pilgrim_isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    Pilgrim_ddEnabled=true;
    document.onmousemove=Pilgrim_dd;
  }
}

function Pilgrim_dd(e){
  if (!Pilgrim_ddEnabled) return;
  whichDog.style.left=Pilgrim_isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=Pilgrim_isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

//document.onmousedown=Pilgrim_ddInit;
document.onmouseup=Function("Pilgrim_ddEnabled=false");


