	// Ramvirus Default Javascript Function
	//-----------------------------------------------------------------------//
	
	// new window create
	function openwindow(twidth,theight,url,name)
	{
		var temp_width = twidth; // width
		var temp_height= theight; // height
		var temp_left = ( screen.width - temp_width ) / 2;
		var temp_top = ( screen.height - temp_height ) / 2;

		window.open(url,name,"resizable=yes, status=yes, scrollbars=yes, left="+temp_left+", top="+temp_top+", width="+temp_width+", height="+temp_height);
		return;
	}

	// new window create
	function openwindow2(twidth,theight,url,name)
	{
		var temp_width = twidth; // width
		var temp_height= theight; // height
		var temp_left = ( screen.width - temp_width ) / 2;
		var temp_top = ( screen.height - temp_height ) / 2;

		window.open(url,name,"resizable=no, status=no, scrollbars=no, left="+temp_left+", top="+temp_top+", width="+temp_width+", height="+temp_height);
		return;
	}

	// ÁÖ¾îÁø ÆÐÅÏÀÇ °ªÀÎÁö¸¦ °Ë»çÇÕ´Ï´Ù.
	function ispattern(chkdata,pattern)
	{
		var temp;
		
		for(var i=0;i < chkdata.length; i++) {
			temp = "" + chkdata.substring(i,i+1);
			if(pattern.indexOf(temp) == "-1") return false;	
		}
		
		return true;
	}

	// selectbox check 
	function ischeck(obj)
	{
		for(i=0;i<obj.length;i++) {
			if(obj[i].checked) return obj[i].value;
		}
		
		return false;
	}

	// keyboard enter key press
	function keycode_submit(obj)
	{
		if(event.keyCode == 13) obj.submit();
		return;
	}

	// checkbox all check
	function allcheck()
	{ 
		var obj1 = document.getElementsByName("allchk");
		var obj2 = document.getElementsByName("chk[]");
		
		if(obj1.item(0).checked)
		{
			for(i=0;i<obj2.length;i++) {
				obj2.item(i).checked = true;
			}
		} else {
			for(i=0;i<obj2.length;i++) {
				obj2.item(i).checked = false;
			}			
		}
		
		return;
	} 

	// table show & hidden
	var rollFlag=0;
	function textroll(str)
	{
		if(document.all[str].style.display=="") {
			document.all[str].style.display="none";
		} else {
			document.all[str].style.display="";
		}
	}
		
	// form field values input
	function form_field_input(targetobj,input_value)
	{
		targetobj.value = input_value;
		return;
	}

	function tableshowhidden(obj)
	{
		//obj = document.getElementById("fcategorylayer");
		
		if(obj.style.display == "none") {
			obj.style.display = "";
		} else {
			obj.style.display = "none";
		}
	}

	function delete_submit(target_obj)
	{
		var obj = target_obj;

		var chkobj = document.getElementsByName("chk[]");
		var ischk = null;

		for(i=0;i<chkobj.length;i++) {
			if(chkobj.item(i).checked) ischk = chkobj.item(i).value + ",";
		}
		
		if(!ischk) { alert('»èÁ¦ÇÒ ´ë»óÀ» ¼±ÅÃÇØ ÁÖ½Ê½Ã¿À.'); return; }
		if(window.confirm('¼±ÅÃÇÏ½Å Ç×¸ñÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n\nÇÑ¹ø »èÁ¦µÈ Á¤º¸¸¦ º¹±¸ÇÒ ¼ö ¾ø½À´Ï´Ù.'))
		{
			obj.submit();
		}
		
		return;				
	}

	function product_image(pno)
	{
		openwindow2(800,550,'./product_image.php?pno='+pno,'product_image');
		return;
	}
	
	function product_image_change(img)
	{
		document.product_info.main_image.src = img;
		return;
	}		

	function customer_product_qna(pno,qtype,brand)
	{
		openwindow2(500,575,'/shop/customer_qna_write.php?pno='+pno+'&qtype='+qtype+'&brand='+brand,'customer_qna_write');
		return;
	}
	
	// AJAX function 
	//-----------------------------------------------------------------------//	
	function newXMLHttpRequest() { 
	
	  var xmlreq = false; 
	
	  if (window.XMLHttpRequest) { 
	    
	    // Create XMLHttpRequest object in non-Microsoft browsers (ff)
	    xmlreq = new XMLHttpRequest(); 
	    
	  } else if (window.ActiveXObject) {  
	    
	    // Create XMLHttpRequest via MS ActiveX       
	    try { 
	      xmlreq = new ActiveXObject("Msxml2.XMLHTTP"); 
	    } catch (e1) { 
	      try { 
	        xmlreq = new ActiveXObject("Microsoft.XMLHTTP"); 
	      } catch (e2) { 
	        // Unable to create an XMLHttpRequest with ActiveX 
	      } 
	    } 
	  } 
	  return xmlreq; 
	}
	
	/* Sample function
	function processReqChange() { 
	
	if(req.readyState == 4 && req.status == 200) {
		printData();
	}
	} 
	
	function printData(obj) { 
	    document.getElementById("serverMsg").innerHTML = req.responseText; 
	}
	
	function createfunction()
	{
		
	  req = newXMLHttpRequest();
	  req.onreadystatechange = processReqChange;
	
	  req.open("GET", "sample.php", true);
	  req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");//¿äÃ»Çì´õÀÇ Á¤ÀÇ 
	  req.send();
	} */ 
	

document.oncontextmenu = function () { return false; };
document.onselectstart = function () { return false; };
document.ondragstart   = function () { return false; };

