// ArchetypeJS 1.0

// creates pop-up windows for all links of class='popUp'
// for internal links that use the 'popUp' layout
function setupPopUp() {
	allNodes = $(".popUp");
	for(i = 0; i < allNodes.length; i++) {
	  allNodes[i].onclick = function() {
	    popUp(this.getAttribute("href"));
	    return false;
	  }
	}
}
function popUp(winURL) {
	var url = winURL;
	window.open(url,"popUp","height=400,width=600,left=100,top=100,toolbar=no,resizable,location=no,directories=no,status=no,scrollbars=yes");
}
$(document).ready(function() {
	setupPopUp();											 													 
});

// setupPopUp funciton
// creates pop-up windows for all links of class='newWin'
// for external links
function setupNewWin() {
	allNodes = $(".newWindow");
	for(i = 0; i < allNodes.length; i++) {
	  allNodes[i].onclick = function() {
	    newWin(this.getAttribute("href"));
	    return false;
	  }
	}
}
function newWin(winURL) {
	var url = winURL;
	window.open(url,"newWin","height=500,width=700,left=100,top=100,toolbar=yes,resizable,location=yes,directories=yes,status=yes,scrollbars=yes");
}
$(document).ready(function() {
	setupNewWin();											 													 
});
