// this function takes the page name from the url and passes it to the /print page
// the server has a rewrite so "/print/mypage.html" is the same as "/print.cfm?p=mypage.html"

function print(){
	var myURL = location.href;
	var loc=myURL.lastIndexOf('/');
	var myPage = myURL.substr(loc+1,myURL.length);
	var locOfDot = myPage.lastIndexOf('.');
	var pageName = myPage.substring(0,locOfDot);
	if(myPage.length>2){
		window.open('/chinese/print.cfm?p=' + myPage,'print','width=700,height=500,toolbar=1,resizable=1,scrollbars=1');
		//window.location = "/print/" + myPage;
	}else{
		window.open('/chinese/print.cfm?p=index.html','print','width=700,height=500,toolbar=1,resizable=1,scrollbars=1');
		//window.location = "/print/index.html";
	}
}
