	var base_domain	= 'http://www.openyours.com';

	// ¾ÕµÚ °ø¹éÁ¦°Å
	String.prototype.trim = function() { 
		return this.replace(/(^\s*)|(\s*$)/g, ""); 
	}
	// Null À¯¹« Return
	String.prototype.notNull = function() {
		return (this == null || this.trim() == "") ? false : true; 
	}
	// ¸ÞÀÏÀ¯È¿ Return
	String.prototype.mail = function() {
		var em = this.trim().match(/^[_\-\.0-9a-zA-Z]{3,}@[-.0-9a-zA-z]{2,}\.[a-zA-Z]{2,4}$/);
		return (em) ? true : false;
	}
	// ¼ýÀÚ À¯¹« Return
	String.prototype.num = function() {
		return (this.trim().match(/^[0-9]+$/)) ? true : false;
	}
	
	// ¿µ¾î¸¸ Ã¼Å©
	String.prototype.eng = function() {
		return (this.trim().match(/^[a-zA-Z]+$/)) ? true : false;
	}

	String.prototype.engnum = function() {
		return (this.trim().match(/^[0-9a-zA-Z]+$/)) ? true : false;
	}

	// ¾ÆÀÌµð Ã¼Å© ¿µ¾î¿Í ¼ýÀÚ¸¸ Ã¼Å© Ã¹±ÛÀÚ´Â ¿µ¾î·Î ½ÃÀÛ	
	String.prototype.userid = function() {
		return (this.trim().match(/[a-zA-z]{1}[0-9a-zA-Z]+$/) == this.trim()) ? true : false;
	}

	// ÀÔ·Â±æÀÌ Return
	String.prototype.getLength = function() {
		return this.length;
	}

	// Ã¼Å©¸ðµâ
	function input_check(obj,msg,exp,sn,en){
		if(!obj.value.notNull()){ alert(msg);obj.value="";obj.focus();return 1;}
		if( "@" == exp && !obj.value.mail()){alert("Çü½Ä¿¡ ¸ÂÁö¾Ê´Â ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼Ì½À´Ï´Ù!!");obj.focus();return 1; }
		if( "n" == exp && !obj.value.num()){alert("¼ýÀÚ¸¸ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!!");obj.value="";obj.focus();return 1; }
		if( !obj.value.notNull() && !isNaN(exp) && exp != obj.value.getLength() ){alert("¼ýÀÚ("+exp+")ÀÚ¸® ÀÔ·ÂÇØÁÖ¼¼¿ä!!");obj.value="";obj.focus();return 1;}
		if( !isNaN(sn) && !isNaN(en) && ( sn > obj.value.getLength() || en < obj.value.getLength()) ){
			alert(msg+" "+sn+"~"+en+"ÀÚ¸®¸¦ ÀÔ·ÂÇØÁÖ¼¼¾ß ÇÕ´Ï´Ù!!");obj.value="";obj.focus();return 1;}
		if( ("m" == exp) && !obj.value.userid() ){alert(msg);obj.value="";obj.focus();return 1;}
		if( ("en" == exp) && !obj.value.engnum() ){alert(msg);obj.value="";obj.focus();return 1;}
	}	
	
	// ÀÌ¹ÌÁö º¯°æ( onMouseOver/onMouseOut )
	var imgChange = function(obj,src){
		if( src ) old_img = obj.src;
		obj.src = (src)?src : old_img;
	}
	var getlocation = function(url,dm,opt,add_no){
		var dm	= ( dm )? dm : 1;
		var osp_url = "";
		var url	= ( url )? url : "";
		if( 1 == dm ) osp_url = base_domain; 
		else if( 2 == dm ) osp_url = "http://cos.openyours.com";
		
		if( opt == "op" ) opener.location.href = osp_url + url;
		else if( opt == "op1" ) opener.parent.location.href = osp_url + url;
		else if( opt == "op2" ) parent.location.href = osp_url + url;
		else location.href = osp_url + url;

		if( opt == "op3" )
		{
			var f = document.DEFAULT_FORM;
			f.target	= "";
			f.Add_no.value=add_no;
			f.action	= osp_url + url;
			f.submit();
		}	

		if( opt == "op4" )
		{
			parent.parent.location.href = osp_url + url;
		}	

	}

	function f_iframe_auto(iframeObj,sub){		
		//frame.height = osp_iframe.document.body.scrollHeight;		
		var innerBody = iframeObj.contentWindow.document.body;  
		var innerHeight = innerBody.scrollHeight; // + (innerBody.offsetHeight - innerBody.clientHeight);
		//var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
		iframeObj.style.height = innerHeight+"px";
		if( parent.document.getElementById('communityArticle') && sub == 'ok' ){
			f_iframe_auto(parent.document.getElementById('communityArticle'));
		}
		//iframeObj.style.width = innerWidth;
	}	
	
	function f_postView(turl,target,opt){
		window.open(turl, target, "");
	}

	var viewImage = function(imgurl){
		//if( navigator.appName.indexOf("Microsoft")== -1){alert('Áö¿øÇÏÁö ¾ÊÀº ºê¶ó¿ìÀúÀÔ´Ï´Ù!!');return false;}
		if( navigator.appName.indexOf("Microsoft") == -1 && imgurl.indexOf("http://") == -1 ){alert('Áö¿øÇÏÁö ¾ÊÀº ºê¶ó¿ìÀúÀÔ´Ï´Ù!!');return false;}
		var win = window.open("","","width='';height='',scrollbars=auto");
		win.document.write("<html><head>");
		win.document.write("<title>:::::º¸±â:::::</title>");
		win.document.write("<script>function resizeWindow(){var ig=document.getElementById('imgView'); var w=ig.width+10; var h=ig.height+60; window.resizeTo( w,h );}</script>");
		win.document.write("</head>");
		win.document.write("<body leftmargin='0' topmargin='0'  onload='resizeWindow()'>");
		win.document.write("<img src='"+imgurl+"' border='0' onClick='window.close()' style='cursor:pointer' id='imgView'>");
		win.document.write("</body>");
		win.document.write("</html>");
		win.resizeWindow();
	}

	var Ajax = function(){
	}
	var ajax = new Ajax();
	Ajax.prototype.getXmlHttpRequest = function() {
		var xmlhttp = false;
		xmlhttp = (window.XMLHttpRequest)? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");				
		return xmlhttp;
	}

	Ajax.prototype.callByAjax = function(url, callbackHandler) {
		try {
			var xmlhttp = this.getXmlHttpRequest();
			xmlhttp.open("GET", url , true);
			xmlhttp.onreadystatechange = function() {
				if (xmlhttp.readyState == 4) {
					if (xmlhttp.status == 200) {
						var data = xmlhttp.responseText;
						callbackHandler(data);
					} else { alert("Ajax request failed"); }
				}
			}
			xmlhttp.send(null);
		} catch (e) { alert(e.message);  }
		return false;
	}	

	var ospDefaultHttpRequest = function() {
	}
	var idDefault	= "";
	ospDefaultHttpRequest.prototype.getXmlhttp = function(url,id){
		var targetURL = url;		
		idDefault	  = ( id )? id : "CommunityArticle";
		ajax.callByAjax(targetURL, osp.ospCallbackHTML );
	}

	ospDefaultHttpRequest.prototype.ospCallbackHTML = function(data) {
		idDefault	= ( idDefault )? idDefault : "CommunityArticle";
		document.getElementById(idDefault).innerHTML = data;
	}

	var osp = new ospDefaultHttpRequest();