function clr() {
	target = document.getElementById('cartcmd');
	target.value = 'clear';
	document.cartform.submit();
}

function del(id) {
	target = document.getElementById('cartcmd');
	target.value = 'del';
	target = document.getElementById('cartid');
	target.value = id;
	document.cartform.submit();
}

function add(fId) {
	target = document.getElementById(fId);
	target.submit();
}

function cart() {
	window.location="shopping_cart";
}

function profile() {
	window.location="login/editprofile";
}

function order() {
	target = document.getElementById('osubmit');
	target.submit();
}

function gk() {
	target = document.getElementById('gkform');
	target.submit();
}

  window.onload = function(){
	for (var i = 0; i < $("img.frame").size(); i++){
		if ( $("img.frame").eq(i).parent().get(0).tagName == 'a' || $("img.frame").eq(i).parent().get(0).tagName == 'A' ) $("img.frame").eq(i).parent().wrap("<div class=div_frame id=num_"+i+"></div>");
		else $("img.frame").eq(i).wrap("<div class=div_frame id=num_"+i+"></div>");
		$("img.frame").eq(i).after("<img src=img/lv.gif class=lv /><img src=img/pv.gif class=pv /><img src=img/pn.gif class=pn />");		
		$("#num_"+i).attr("style", $('img.frame').eq(i).attr('style'));
		if ($.browser.safari) $("#num_"+i).css("display", "inline-block");
		else {
			$("#num_"+i).css("width", $('img.frame').eq(i).width());
			$("#num_"+i).css("height", $('img.frame').eq(i).height());
		}
		$("img.frame").eq(i).attr("style", "");
	}
  }
