function cross_event ( event ) {
	var ev;
	if ( window.event ) ev = window.event;
	else ev = event;

	return event;
}


function add_category ( event, no, cname) {

	var l = document.getElementById ("add_layer");
	var f = document.getElementById ("add_form");

	f.no.value = ( no ) ? no : "";
	f.cname.value = ( cname ) ? cname : "";
	l.style.display = "block";

	ev = cross_event (event);

	pos_left = ev.clientX + document.body.scrollLeft - 20;
	pos_top = ev.clientY + document.body.scrollTop + 10;
	if ( pos_left + l.offsetWidth > document.body.scrollWidth ) pos_left = document.body.scrollWidth - l.offsetWidth - 10;


	l.style.left = pos_left;
	l.style.top = pos_top;





}

function close_category () {
	var l = document.getElementById ("add_layer");
	var f = document.getElementById ("add_form");
	
	f.no.value = "";
	f.cname.value ="";
	l.style.display = "none";
}

function mchange (filename) {
	mimg = document.getElementById ("mainimg");
	mimg.src = "/file/product/thumb/"+filename;
}

function enlarge (no, order) {
	var win;
	win = window.open ("/product/enlarge.html?no="+no+"&order="+order,"enlarge","status=no,top=20,left=20,width=605px,height=560px");
	if ( win ) win.focus();
}

function goprd (no) {
	if (no) location.href = "?sub=product&menu=info&no="+no;
}

function r2na_document (skin) {

	skin = getHttpRequest (skin);	
	var r2na = document.frames("R2Na_1");
	var content = document.getElementById ("content");

	r2na.document.body.innerHTML = skin;
}
