﻿
		
		function inputEmail(obj, target)
		{
		    document.getElementById(target).value = obj[obj.selectedIndex].value;
		}
		
		function inputCheck(obj)
		{
		   funcs[obj.getAttribute("OPTION")](obj);
		}
		
		function zipcode(tag)
		{
		    w = 450;
		    h = 420;
		    LeftPosition	= (screen.width)?(screen.width-w)/2:100;
	        TopPosition		= (screen.height)?(screen.height-h)/2:100;
	        settings		= 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition;

	        mywin = window.open('/sub/zipcode.aspx?tag=' + tag, 'zipcode', settings);
	        mywin.self.focus();	    
		}
		

		
		
		function selectCPC(el, target)
		{
		    obj = document.getElementById(target);
		    obj.value = 0;
		    
		    if(el.checked)
		    {
		        obj.disabled = false;
		        obj.style.textAlign = "right";
		        obj.focus();
		    }
		    else
		    { 
		        obj.disabled = true;
		    }
		}
		
		

		// 새창열기
		function newWin(page,name,w,h,scroll,status,resize)
		{
			LeftPosition	= (screen.width)?(screen.width-w)/2:100;
			TopPosition		= (screen.height)?(screen.height-h)/2:100;
			//if(!status) status = 'no';
			settings		= 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status='+status+',resizable='+resize;

			mywin = window.open(page,name,settings);
			mywin.self.focus();

			return mywin;
		}



		function report_login(domain)
		{
		    if(domain){
			    self.location.href = "http://"+domain+"/ViewSPSS/ViewMain.aspx";
			}else{
			    self.location.href = "/ViewSPSS/ViewMain.aspx";
			}
		}


		function getCookie( name )
		{
			var nameOfCookie = name + "=";
			var x = 0;
			while ( x <= document.cookie.length )
			{
				var y = (x+nameOfCookie.length);
				if ( document.cookie.substring( x, y ) == nameOfCookie ) {
					if ( (endOfCookie = document.cookie.indexOf( ";", y )) == -1 )
						endOfCookie = document.cookie.length;
					return unescape( document.cookie.substring( y, endOfCookie ) );
				}
				x = document.cookie.indexOf( " ", x ) + 1;
				if ( x == 0 )
					break;
			}
			return "";
		}

		

		function setCookie( name, value, expiredays )
		{
			var todayDate = new Date();
			todayDate.setDate( todayDate.getDate() + expiredays );
			document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
		}