//·¹ÀÌ¾îÀÇ À§Ä¡¸¦ °áÁ¤
function locateLayer(objName,X,Y){
	var obj = document.all[objName].style; obj.left = X;	obj.top = Y;
}
//TextBoxÀÇ Size¿Í Maxlength¸¦ º¯°æ
function ChangeSize(obj,pSize,pMaxLen){
	obj.size = pSize; obj.maxLength = pMaxLen;
}	
//Layer hidden,visible
function layer_vis(layerID){
	document.all[layerID].style.visibility = "visible";
} 
function layer_hid(layerID){
	document.all[layerID].style.visibility = "hidden";
}
//ÀÌ¹ÌÁö ¹Ù²Ù±â
function ImgOn(obj){
	obj.src = obj.src.toLowerCase().replace("_off","_on");
	obj.style.cursor = "hand";
}
function ImgOff(obj){
	obj.src = obj.src.toLowerCase().replace("_on","_off");
	obj.style.cursor = "hand";
}
//Style Class ¹Ù²Ù±â
function StyleOn(obj){
	obj.className = obj.className.toLowerCase().replace("_off","_on");
}
function StyleOff(obj){
	obj.className = obj.className.toLowerCase().replace("_on","_off");
}

//»õÃ¢¶ç¿ì±â
function winopen(URL,WinName,ScrollBar,top,left,width,height){
top=0;
left=0;	
 if (width == null) width=800;
 if (height == null) height=700;
 window.open(URL,WinName,"scrollbaRS=" + ScrollBar + ",toolbar=no,location=no,directories=no,status=no,width="+width+",height="+height+",resizable=no,menubar=no,top=" + top + ",left=" + left);
}
//¹Ýº¹Replace
function LoopReplace(Expression,Find,Replaced){
	while (Expression.indexOf(Find) > 0){
		Expression = Expression.replace(Find,Replaced);
	}
	return Expression;
}
//EnterÄ¡¸é ¼­ºê¹ÔÇÏ°Ô
function FormSubmit(objForm){
	if(event.keyCode ==13){ 
     return FormCheck(objForm);     
  } 
}

function FormSubmitSearch(objForm){
	if(event.keyCode ==13){ 
     objForm.submit(); 
  } 
}


//¼ýÀÚ¸¸ ÀÔ·Â¹Þ°Ô
function OnlyNumber(obj){
	var regS = /[^0-9]+/g;
	obj.value = obj.value.replace(regS,'');
}
//ÆË¾÷Ã¢Å©±âÁ¶Àý
function resizePopUP(marginWidth,marginHeight,tableID){
	var maxWidth = 1000;
	var maxHeight = 700;
	
	var oTable = document.all[tableID]
	
	var x = oTable.offsetWidth+marginWidth;
	var y = oTable.offsetHeight+marginHeight;
	
	//var x = oTable.clientWidth+marginWidth;
	//var y = oTable.clientHeight+marginHeight;
	
	
	if (x > maxWidth) x = maxWidth;
	if (y > maxHeight) y = maxHeight;
	//alert( oTable.clientWidth + ' ' + oTable.clientHeight)
	window.resizeTo(x,y);
	window.focus();
	//alert( oTable.clientWidth + ' ' + oTable.clientHeight)
}

function SetCookie(name, value) {
   var argv = SetCookie.arguments;
   var argc = SetCookie.arguments.length;
   var expires = (2 < argc) ? argv[2] : null;
   var path = (3 < argc) ? argv[3] : null;
   var domain = (4 < argc) ? argv[4] : null;
   var secure = (5 < argc) ? argv[5] : false;
   document.cookie = name + "=" + escape (value) +
      ((expires == null) ? "" : 
         ("; expires=" + expires.toGMTString())) +
      ((path == null) ? "" : ("; path=" + path)) +
      ((domain == null) ? "" : ("; domain=" + domain)) +
      ((secure == true) ? "; secure" : "");
} 




//Popup Left °Ë»öÃ¢ ¿ÀÇÂÇÏ±â
function OpenMiniSearchWindow(vURL,vWidth,vHeight){
	var oSearchTable = document.all["MINISEARCH"];
	var oLabel = document.all["SearchLabel"];
	var oFrame = document.all["SearchFrame"];
	
	if (vURL==null) vURL = "";
	if (vWidth==null) vWidth = "300px";
	if (vHeight==null) vHeight = "100%";
	
	oFrame.width=vWidth
	oFrame.height=vHeight
	
	if (vURL != "") oFrame.src=vURL;
	
	oSearchTable.style.display='';
		
	ResizeThis();
}
//Popup Left °Ë»öÃ¢ ´Ý±â
function CloseMiniSearchWindow(){
	var oSearchTable = document.all["MINISEARCH"];
	var oLabel = document.all["SearchLabel"];
	var oFrame = document.all["SearchFrame"];
	
	oSearchTable.style.display='none';

	ResizeThis();
}
///////////////////»ç¿ëÀÚ¿µ¿ª////////////////////////
function View_Company(vID){
	winopen("/KMS/Company/ContView.asp?Co_ID="+vID,"Company","yes",50,50);
}

function View_ItemMaster(vID){
	winopen("/MarketInfo/ItemInfo/ContView.asp?Item_No="+vID,"ItemMaster","yes",50,50);
}
function View_Deal(vID){
	winopen("/IMS/DealList/ContView.asp?Deal_No="+vID,"Deal","yes",50,50);
}


function GoConference(){
	location.href="/Contents/Conferences/loading.asp"
}



//Active X °ü·Ã - flash º¸¿©ÁÖ±â
function FlashViewer(fname, fwidth, fheight)
{
var flashStr = " <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='" + fwidth + "' height='" + fheight + "'> ";
flashStr = flashStr + "<param name='movie' value='" + fname + "'> ";
flashStr = flashStr + "<param name='quality' value='high'> ";
flashStr = flashStr + "<embed src='" + fname + "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + fwidth + "' height='" + fheight + "'> ";
flashStr = flashStr + "</object> ";
document.write (flashStr);

}


// Conference ¸µÅ© ÆË¾÷
function popup(){ 
window.open("/Contents/Conferences/2006/popup/popup.html","","toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top=100,left=100,width=620,height=630"); 
}

