// JavaScript Document
// vendorListing Navigation

function navSelected(a){
	var subList = document.getElementById('nav_tier2_'+a);
	var	navLast = document.frmNav.last;
	var navImg = document.getElementById('img_'+a);
	if(navLast.value>0){//Close Previously Open Navigation
		document.getElementById('nav_tier2_'+navLast.value).style.display = 'none';
		document.getElementById('img_'+navLast.value).src = 'includes/images/czCollapse.gif';
	}
	if(navLast.value==a){//Close Navigation
		navImg.src = 'includes/images/czCollapse.gif';
		navLast.value = 0;
		subList.style.display = 'none';	
	}
	else{//Open Navigation
		navImg.src = 'includes/images/czExpand.gif';
		navLast.value = a;
		subList.style.display = 'block';	
	}
}

function navExpand(a){
	alert(a);
}

function specialOffer(a){
	winHandle = window.open('vendor_special_offer.cfm?vendor_id='+a,'soffer'+a,'toolbars=0,scrollbars=0,location=0,statusbars=0,menubars=0,resizable=1,width=800,height=600');
	winHandle.moveTo((screen.availWidth-800)/2, (screen.availHeight-600)/2 ); 
}

function advertisement(a){
	winHandle = window.open('vendor_advertisement.cfm?vendor_id='+a,'soffer'+a,'toolbars=0,scrollbars=1,location=0,statusbars=0,menubars=0,resizable=1,width=800,height=600');
	winHandle.moveTo((screen.availWidth-800)/2, (screen.availHeight-600)/2 ); 
}
function advertisement1(a){
	winHandle = window.open('ad_advertisement.cfm?ad_id='+a,'soffer'+a,'toolbars=0,scrollbars=1,location=0,statusbars=0,menubars=0,resizable=1,width=800,height=600');
	winHandle.moveTo((screen.availWidth-800)/2, (screen.availHeight-600)/2 ); 
}
