
print_all = function () {
	window.print();
};

print_part = function (frame) {
	window.print();
};

print_auto = function () {
	window.print();
};

print_cut = function (frame,cutTop,cutRight,cutBottom,cutLeft) {
	window.print();
};

function addQuickButton() {
	addPrintButton();
	wa_license();
}

function wa_license(){
	var wa_mark = $("wa_mark");
	
	wa_mark.onclick = function(){
		window.open( contextPath + "/wa_license.dmj" , "license" , "width=400, height=600 scrollbars=yes,resizable=yes");
		return false;
	};
	wa_mark.onpresskey = wa_mark.onclick;
}

function addPrintButton() {
	var li = document.createElement("li");
	var a = document.createElement("a");
	var img = document.createElement("img");
	var pathname = window.location.pathname;
	
	img.src = contextPath + "/eng_img/eng_main_top_menu4.gif";
	img.alt = "Print";
	
	li.id = "liPrint";
	a.appendChild(img);
	li.appendChild(a);
	
	a.onclick = function() {
		//print_all(); ±¸¹öÀü ¾÷µ¥ÀÌÆ® 2011.12.20
		if(pathname != "/eng_main.dmw") {
			PTM.print_div("contents");
		}
		else {
			PTM.print_all();
		}
		return false;
	};
	
	a.href = "";
	
	var ul = $("topMenu").getElementsByTagName("ul")[0];
	
	new Insertion.Bottom(ul,li);
	ul = null;
	
}

Event.observe(window, "load", addQuickButton, false);
