// title
document.title=" :: KUMHO TIRES ::";
var ns = (document.layers)? true:false;
var ie = (document.all)? true:false;
var doc = (ie)? document.all : document;
// DESC : Javascript Utility
function DeleteConfirm(StrURL) {
var bRet;
bRet = confirm("The data which it eliminates it will not be able to rehabilitated.\nTruth it eliminates?");
if(bRet) {
window.location = StrURL;
}
}
function callCalendar(datetime,field){
dateField = field;
__showCalendarPanel(datetime,'::');
}
function __showCalendarPanel(type, param, title, x, y)
{
if(param == null){
alert("Javascript:__showCalendarPanel: You must specify the parameter");
return;
}
var separator = ":";
var pa = param.split(separator);
if(pa.length != 3) //<= 1 || (pa[0].length <= 0 && pa[1].length <= 0))
{
alert("Javascript:__showCalendarPanel: You must specify INPUT objects name to be set to local datetime or GMT one");
return;
}
var left = 100;
var top = 200;
if(x != null) left = x;
if(y != null) top = y;
var url = "/common/calendar.jsp?type=" + type + "&objLocalDate=" + pa[0] + "&objGMTDate=" + pa[1] + "&initDateTime=" + pa[2] + ( title != null ? "&title=" + title : "");
var width = (ie) ? "230":"240";
if( type == "date" )
var height = (ie) ? "288":"293";
else
var height = (ie) ? "318":"323";
var ws = "left=" + left + ",top=" + top + ",menubar = no,width=" + width + ",height=" + height + ",resizable=no,scrollbars=no";
window.open(url, "__newWin", ws);
}
function setDateTime(local, gmt, type){
if(type=='date'){
dateField.value = local.substring(0, 4)
+ "-" + local.substring(4, 6)
+ "-" + local.substring(6, 8);
}
else{
dateField.value = local.substring(0, 4)
+ "-" + local.substring(4, 6)
+ "-" + local.substring(6, 8)
+ " " + local.substring(8, 10)
+ ":" + local.substring(10, 12);
}
}
function OpenWin(URL,WinName,x,y,Menu,cSize,scroll) {
var features;
var nTop = (screen.height - y) / 2 - 30;
var nLeft = (screen.width - x) / 2;
if (Menu == 0 )
features = "toolbar=no,width=" + x + ",height=" + y + ",top=" + nTop + ",left=" + nLeft + ",status=no,menubar=no";
else
features = "toolbar=no,width=" + (x + 18) + ",height=" + y + ",top=" + nTop + ",left=" + nLeft + ",status=no,menubar=yes";
if (cSize == 0)
features = features + ",resizable=no";
else
features = features + ",resizable=yes";
if (scroll == 0 )
features = features + ",scrollbars=no";
else
features = features + ",scrollbars=yes";
//alert(features);
TheWindow = window.open(URL, WinName, features);
}
function OpenWinHide(URL,WinName){
TheWindow = window.open(URL,WinName,'top=100,left=100,width=100,height=100,status=no,menubar=no,resizable=no,scrollbars=no');
}
function OpenZipCode(frmNm,zipNm,adrNm){
OpenWin('/common/zipcode_popup.jsp?frmNm='+frmNm+'&zipNm='+zipNm+'&adrNm='+adrNm,'zipcd',367,275,0,0,1);
}
// POPUP-PAGE AUTO RESIZE //
function resize_pop_600_scroll() {
var obj = navigator.appVersion;
var hei = 29;
if (navigator.appVersion.indexOf("NT") != -1) {
os = obj.substr(obj.indexOf("NT"),6);
if (os > "NT 5.0") {
hei = 35;
}
}
wid = document.body.scrollWidth+10;
hei = document.body.scrollHeight+hei;
if(hei>600) hei=600;
self.resizeTo(wid+16,hei);
this.focus();
}
//E-mail type prosecuting attorney
function isEmail(elm) {
var at = elm.indexOf("@");
var length = elm.length;
if((at == -1) || (length-1) == at) {
return false;
}
else {
for(var i=0; i < length; i++) {
var ch = elm.charAt(i);
if(i == at) {
continue;
}
else if(elm.indexOf(".", at) == -1) {
return false;
}
else if((ch >= 'A' && ch <= 'z') || (ch >= '0' && ch <= '9') || ch == '.' || ch == '_' || ch == '-') {
continue;
}
else {
return false;
}
}
return true;
}
}
//Checking which probably is all number
function isDigit(number) {
for(var i=0;i < number.length;i++){
if (!(number.charAt(i) >= "0" && number.charAt(i) <= "9")){
return false;
}
}
return true;
}
//Checking which probably is all number
//(The object it passes over and when it receives and is not the number and it leaves space a message with automatic movement.)
// Ex)
function chkNumeric(obj){
var str = "";
var sChk = 0;
var src = obj.value;
for(var i=0; i< src.length; i++){
if(isNaN(src.charAt(i))||src.charAt(i) == " ") sChk += 1;
else str += src.charAt(i);
}
if(sChk!=0){ alert("[Input error]: Only number input."); obj.value = str; return false; }
return true;
}
//ID and passwd checking(Checking which is composed of only a number or an alphabet.)
function isDigitEng(val) {
for(var i=0;i < val.length;i++) {
if (!(((val.charAt(i) >= "0") && (val.charAt(i) <= "9")) || ((val.charAt(i) >= "A") && (val.charAt(i) <= "Z")) || ((val.charAt(i) >= "a") && (val.charAt(i) <= "z"))) == true)
return false;
}
return true;
}
//ID and passwd checking (It does not return a price not to be, message it leaves space with automatic movement and the blank to put in.)
// Ex)
function chkNumEng(obj) {
var str = "";
var sChk = 0;
var src = obj.value;
for(var i=0;i < src.length;i++) {
if (!(((src.charAt(i) >= "0") && (src.charAt(i) <= "9")) || ((src.charAt(i) >= "A") && (src.charAt(i) <= "Z")) || ((src.charAt(i) >= "a") && (src.charAt(i) <= "z"))) == true)
sChk += 1;
else str += src.charAt(i);
}
if(sChk!=0){ alert("[Input Error]: Only English or number input."); obj.value = str; return false; }
return true;
}
/*
* 2byte With it recognizes the Korean alphabet and well it buys the length which becomes
*/
function getByteLength(s){
var len = 0;
if ( s == null ) return 0;
for(var i=0;i 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = escape(name) + "=" + escape (value) +
(( expires == null) ? "" : ( "; expires=" + expires.toGMTString() ) ) +
(( path == null) ? "" : ( "; path=" + path ) ) +
(( domain == null) ? "" : ( "; domain=" + domain ) ) +
(( secure == true) ? "; secure" : "" );
}
function deleteCookie (name)
{
var exp = new Date();
exp.setTime ( exp.getTime() - 1 );// This cookie is history
var cval = getCookie (escape(name));
document.cookie = escape(name) + "=" + cval + "; expires=" + exp.toGMTString() + "; path=/";
}
/*
* Image Change
*/
function imagechange(imagename, imageurl)
{
document.images[imagename].src=imageurl;
}
function over(image)
{
var image_name = image + '_over.gif';
document.images[image].src = image_name;
}
function out(image)
{
var image_name = image + '_out.gif';
document.images[image].src = image_name;
}
function swapimage(file,imagename,defaultimage)
{
var imagefile;
var tmpimage = new Image;
// default image
if(file.value==''){
imagefile = defaultimage;
}
else{
imagefile = "file:///"+file.value;
}
// change image
tmpimage.src=imagefile;
document[imagename].src = tmpimage.src;
document[imagename].width = tmpimage.width;
document[imagename].height = tmpimage.height;
// form value setting
return true;
}
// swapImg
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i