<!--
var z = location.href.substring(location.href.lastIndexOf("/")+1);
if (top != self)
{top.location.replace('http://www.templatemonstersearch.com/' + z);}

var affInterfaceOptions = '&pr_code=oXbeXIWwcKsm9O1g61P14h637fa9Di';

function IncludeAffInterface(options,file){
	if(!file) file = 'pr_interface';
	options = affInterfaceOptions + (options ? '&'+options : '');
	document.write('<SCRIPT type="text/javascript" language="JavaScript" src="http://www.templatehelp.com/codes/'+file+'.php?'+options+'"><'+'/SCRIPT>');
}

function Popup(url){
	window.open(
		url,
		'window',
		'width=600, height=600, resizable=yes, scrollbars=yes, location=no, toolbar=no, menubar=no, status=no'
	);
}

function quietStatus(){
	window.status = document.readyState!="complete" ?
		"Press F5 Key if not loading..." : window.defaultStatus;
}
document.onreadystatechange = quietStatus;


document.onclick=check; 

function check(e){ 
	var target = (e && e.target) || (event && event.srcElement); 
	
	// products
	var obj = document.getElementById('productsDD'); 
	var obj2 = document.getElementById('prodDrop'); 
	var parent = checkParent(target); 
	if(parent){obj.style.visibility='hidden'} 
	if(target==obj2){obj.style.visibility='visible'} 

	// author
	var obj3 = document.getElementById('authorDD'); 
	var obj4 = document.getElementById('authorDrop'); 
	var parent2 = checkParent(target); 
	if(parent2){obj3.style.visibility='hidden'} 
	if(target==obj4){obj3.style.visibility='visible'} 

	// category
	var obj5 = document.getElementById('catDD'); 
	var obj6 = document.getElementById('catDrop'); 
	var parent3 = checkParent(target); 
	if(parent3){obj5.style.visibility='hidden'} 
	if(target==obj6){obj5.style.visibility='visible'} 
} 

function checkParent(t){ 
	while(t.parentNode){ 
		if(t==document.getElementById('productsDD')){ 
			return false 
		} 
		if(t==document.getElementById('catDD')){ 
			return false 
		} 
		if(t==document.getElementById('authorDD')){ 
			return false 
		} 
		if(t==document.getElementById('productsTable')){ 
			return false 
		} 
		if(t==document.getElementById('catTable')){ 
			return false 
		} 
		if(t==document.getElementById('authorTable')){ 
			return false 
		} 


		t=t.parentNode 
	} 
	return true 
} 

function productsSelect(productName, productID){
	document.getElementById('prodDrop').value = productName;
	document.getElementById('prodHidden').value = productID;
	document.getElementById('productsDD').style.visibility = 'hidden';
}

function authorSelect(authorID){
	document.getElementById('authorDrop').value = authorID;
	document.getElementById('authorHidden').value = authorID;
	document.getElementById('authorDD').style.visibility = 'hidden';
}

function catSelect(catName, catID){
	document.getElementById('catDrop').value = catName;
	document.getElementById('catHidden').value = catID;
	document.getElementById('catDD').style.visibility = 'hidden';
}

// Bookmarks

isIE=document.all;
isFF=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN||isFF) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

//-->