// JavaScript Document


// Open a printable view

var printwindow

function goPrint(url){
		
	closePrint(); 
		
	printwindow = window.open(url,"Link","toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=680,height=700,left=0,top=0");
	printwindow.focus(); 
}

// closes Print window 
function closePrint(){
	if (printwindow && !printwindow.closed){
		printwindow.close();
	}
}	

// closes Print window 
function closeSample(){
	if (samplewindow && !samplewindow.closed){
		samplewindow.close();
	}
}	

function printThis() {
	window.print(); 
}

var samplewindow

function showSamples(url){
		
	closeSample(); 
		
	samplewindow = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=649,height=420,left=300,top=200");
	samplewindow.focus(); 
}


// 
// Open a printable view

var itemfinder

function goItemFinder(url){
		
	closeFinder(); 
		
	itemfinder = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width=650,height=350,left=0,top=0");
	itemfinder.focus(); 
}

// closes Print window 
function closeFinder(){
	if (itemfinder && !itemfinder.closed){
		itemfinder.close();
	}
}	


// general popup viewer
function popWin(width, height, url){
	var popWin;
	var options = "toolbar=0,scrollbars=1,resizable=0,width=" + width + ",height=" + height +",left=100,top=100";
	
	popWin = window.open(url,"popwindow",options);
	popWin.focus();
}


// launches the BoldChat window
function launchChat() {
	
	var url = 'https://livechat.boldchat.com/aid/686556295780604090/bc.chat?url=' + escape(document.location.href);
	var params = 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=640,height=480';
	
	this.newWindow = window.open(url, 'Chat', params);
	this.newWindow.focus();
	this.newWindow.opener=window;

}