/******************************************************************************
 Copyright (c) 2007 Samsung Electronics. All Rights Reserved.
 Project: Samsung.com Site Renewal(2007.01~07)

 File Name : common.js
 Description : 제품 관련  JavaScript
 Author : 
 Since : 

 Modification Information
 Mod Date	Modifier	Description
 ----------	--------	---------------------------
2007.04.20	
******************************************************************************/
	
	/*============================================================
	 * typeCode에 따른 Link Open
	 ============================================================*/
	function product_link_open(url, typeCode){
		if(typeCode == 'POPUP'){
			openWindow( 740, 525, url, 1);
		}
		else if(typeCode == 'MOVE'){
			window.location.href = url;
		}
		else if(typeCode == 'NEW'){
			window.open(url);
		}
		else {
			window.open(url);
		}	
	}

	function product_link_open2(url, typeCode){
		if(typeCode == 'POPUP'){
			openWindow2(740, 525, url, 1);
		}
		else if(typeCode == 'MOVE'){
			window.location = url;
		}
		else if(typeCode == 'NEW'){
			window.open(url);
		}
		else {
			window.open(url);
		}	
	}

	function openWindow2(vWidth,	vHeight, vUrl, vOpt) {
		var	mdWindow = null;
		var	x	=	(screen.width	-	vWidth)/2;
		var	y	=	(screen.height - vHeight)/2;
		var	opt;
		if (vOpt ==	"" ||	vOpt ==	null)	vOpt = 0;
		opt	=			"width=" + vWidth	+	",height=" + vHeight;
		opt	=	opt	+	",scrollbars=" + vOpt	+	",toolbar=0,menubars=0,locationbar=0,historybar=0,statusbar=0";
		opt	=	opt	+	",outerWidth=" + vWidth	+	",outerHeight="	+	vHeight	+	",resizable=0";
		opt	=	opt	+	",left=" + x + ",top=" + y;
		opt	=	opt	+	",channelmode=no,	titlebar=no";

		var	mdWindow = window.open(vUrl, "", opt,	false);
	}