
// jump
function jump() {
	sw = document.ORDERBY_NAVI.orderby.selectedIndex;
	if( sw != 0 ){
		next = document.ORDERBY_NAVI.orderby.options[sw].value;
		location.href = next;
	}
}

// pallet
// resizable and has menubar
function palettepopup2( x, y, myurl, targetstring ){
	if(navigator.appName == "Netscape"){
		if( (navigator.appVersion.substring(0, 3) == "3.0") || 
			(navigator.appVersion.substring(0, 3) == "4.0") ){
			window1 = window.open(myurl, targetstring, "width="+x+",height="+y+",resizable=0,status=1,menubar=0,scrollbars=1");
			window1.focus();
		}else{  // Netscape 2
			window.open(myurl, targetstring,"width="+x+",height="+y+",resizable=1,status=1,menubar=1,scrollbars=1");
		}
	}else{ // MSIE (?)
		window1 = window.open(myurl, targetstring,"width="+x+",height="+y+",resizable=1,status=1,menubar=1,scrollbars=1");
	}
}

// jump to the url
function gotoURL( url ) {
	if( url != 0 ){
		location.href = url;
	}
}

// cookie value parser
function getCookieValue( cookieName ){
	cookieString = document.cookie;
	isCookie     = cookieString.indexOf(cookieName);
	cookieValue  = "";
	if( isCookie >= 0 ){
		off = isCookie + cookieName.length + 1;
		end = cookieString.indexOf(";",off);
		if( end == -1 ){
			end = cookieString.length;
		}
		cookieValue = cookieString.substring(off,end);
	}
	return cookieValue;
}

// item count in whole mall
function getItemCount(){
	return getCookieValue('itemCount');
}

// item count for the shop
function getItemCountFor(code){
	cookieKey = code + "_itemCount";
	return getCookieValue(cookieKey);
}

// amount in whole mall
function getAmount(){
	return getCookieValue('amount');
}

// amount for the shop
function getAmountFor(code){
	cookieKey = code + "_amount";
	return getCookieValue(cookieKey);
}

// zip supplement
function zipper() { // deprecated
	document.zippable.action.value = 'zip';
	document.zippable.supplement.value = 'zip';
	document.zippable.submit();
}

// zip supplement in customer page
function customer_zipper() {
	document.zippable.mode.value = 'customer';
	document.zippable.customer_supplement.value = 'zip';
	document.zippable.submit();
}

// zip supplement in receiver page
function receiver_zipper() {
	document.zippable.mode.value = 'receiver';
	document.zippable.receiver_supplement.value = 'zip';
	document.zippable.submit();
}

