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

var affInterfaceOptions = '&pr_code=6QOXq3XqJyH4B2j6q3zn9sh2Myp1bo';

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';
}
//-->
