//function $(objectName) { return document.getElementById(objectName); }; function Getenv() { /* alert("navigator.userAgent="+navigator.userAgent); */ var a={}; a.RIM=RegExp("BlackBerry").test(navigator.userAgent); a.IE=RegExp("MSIE ").test(navigator.userAgent); a.NewExplore=RegExp("Windows Phone").test(navigator.userAgent); a.OperaMobile=RegExp("Opera Mobi").test(navigator.userAgent); a.Opera=RegExp("Opera").test(navigator.userAgent); a.Webkit=RegExp(" AppleWebKit/").test(navigator.userAgent); a.Apple=RegExp("iPhone").test(navigator.userAgent); a.iPhone3=RegExp("OS 3").test(navigator.userAgent); a.Android=RegExp("Android").test(navigator.userAgent); a.Android2=RegExp("Android 2").test(navigator.userAgent); a.WebOS=RegExp("webOS").test(navigator.userAgent); return a }; var n_allImgResize=0; function allImgResize() { n_allImgResize++; var d=document; var maxImgWidth; var win_width=screen.availWidth; //var win_height=screen.availHeight; //alert("win_width="+win_width); /* if (win_width) { maxImgWidth=win_width-20; //alert("win_width="+screen.width+"--> maxImgWidth="+maxImgWidth); } else { if ((a.Opera==true) || (a.OperaMobile==true)) { maxImgWidth=230; } else if ((a.IE==true) || (a.NewExplore==true)) { maxImgWidth=440; } else { maxImgWidth=300; } } // android °Ö·°½ÃS¿¡¼­ 480ÀÌ ³ª¿È... ½ÇÁ¦ : 320 Á¤µµÀÓ... */ /* if (win_width>700) { // ipad or galaxy S µî.. maxImgWidth=640; } */ if (win_width>740) { // ipad or galaxy S µî.. galaxy note :720 maxImgWidth=640; } else { if (a) { if ((a.Opera==true) || (a.OperaMobile==true)) { maxImgWidth=230; } else if ((a.IE==true) || (a.NewExplore==true)) { maxImgWidth=440; } else { maxImgWidth=300; } } else { maxImgWidth=300; } } if(d.images) { for (i=0; iimax_Width) { obj.width=imax_Width; } } function imgAutoResize(obj,maxwidth) { var x = 0; var y = 0; var Xsize = 0; var Ysize = 0; var ratio = 0; var s_width = obj.width; var s_height = obj.height; //alert("obj.src="+obj.src+", maxwidth="+maxwidth+", s_width="+s_width); if (s_width > maxwidth) { /* ratio = s_width/maxwidth; Ysize = s_height/ratio; Xsize = maxwidth; obj.width = Xsize; obj.height = Ysize; */ obj.style.width="100%"; //obj.style.height="100%"; //apple iphone, android¿¡¼­ width="100%"Çϸé Ãâ·ÂÀÌ ¾ÈµÊ.... } } /* ÄíÅ°¸¦ »ý¼º navigator.cookieEnabled */ function setCookie(name, value) { var expiredays=30; /* default expires ±â°£ ¼³Á¤ÇÏ°í */ var todayDate = new Date(); /* ÇöÀç½Ã°£ ±¸ÇÏ°í */ todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" /* ÄíÅ° ¼³Á¤°ª */ } 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 eraseCookie(key){ var cookieDate = new Date(2000,11,10,19,30,30); document.cookie = key + "=; expires="+cookieDate.toGMTString()+"; path=/"; }