// title
document.title="¢Æ¢Æ Avis Rent A Good Time! ¢Æ¢Æ";
var pub ="http://www.avis.co.kr/eng";
var _SITE_URL_ ="http://www.avis.co.kr/eng";

var XMLpath =pub+"/inc/flash/";
Home=pub+"/index.jsp";
kor="http://www.avis.co.kr/index.jsp";

var nlocation = document.location.toString();//ÇöÀç ÁÖ¼Ò°ª
if(nlocation.indexOf('http://localhost')>=0){
	_SITE_URL_ = "http://www.avis.co.kr/eng";
	
} 

reservation=_SITE_URL_+"/reserve/domestic/reserve_main.jsp";  //¿Â¶óÀÎ ¿¹¾à 
	reservation01=_SITE_URL_+"/reserve/domestic/reserve_main.jsp";
	reservation02="http://www.avisworld.com";
	reservation03=_SITE_URL_+"/reserve/rentpay/rent_payment.jsp";
	
use=_SITE_URL_+"/use/guide.jsp";  //ÀÌ¿ë¾È³» 
	use01=_SITE_URL_+"/use/guide.jsp";
	use02=_SITE_URL_+"/use/rates.jsp";
		use021=_SITE_URL_+"/use/rates.jsp";
		use022=_SITE_URL_+"/use/inland.jsp";
		use023=_SITE_URL_+"/use/jeju.jsp";
		use024=_SITE_URL_+"/use/long.jsp";
		use025=_SITE_URL_+"/use/driver.jsp";
	use03=_SITE_URL_+"/use/branch.jsp";
		use031=_SITE_URL_+"/use/branch.jsp?flag=seoul";
		use032=_SITE_URL_+"/use/branch.jsp?flag=kg";  
		use033=_SITE_URL_+"/use/branch.jsp?flag=kw";  
		use034=_SITE_URL_+"/use/branch.jsp?flag=cc";  
		use035=_SITE_URL_+"/use/branch.jsp?flag=ks";  
		use036=_SITE_URL_+"/use/branch.jsp?flag=ju";  
		use037=_SITE_URL_+"/use/branch.jsp?flag=jeju";
		use038=_SITE_URL_+"/use/branch.jsp?flag=T";   
		use039=_SITE_URL_+"/use/branch.jsp?flag=A";   
	use04=_SITE_URL_+"/use/car01.jsp";  
	
	

jeju=_SITE_URL_+"/jeju/guide.jsp";
	jeju01=_SITE_URL_+"/jeju/guide.jsp";
		jeju011=_SITE_URL_+"/jeju/guide.jsp";
		jeju012=_SITE_URL_+"/jeju/tour.jsp";
		jeju013=_SITE_URL_+"/jeju/course.jsp";
		jeju014=_SITE_URL_+"/jeju/tour_east.jsp#go4";
		jeju015=_SITE_URL_+"/jeju/tour.jsp";
	jeju02=_SITE_URL_+"/jeju/jeju_pay.jsp";
	
	
company=_SITE_URL_+"/company/why.jsp";
	company01=_SITE_URL_+"/company/why.jsp";
	company02=_SITE_URL_+"/company/aboutus.jsp";
		company021=_SITE_URL_+"/company/aboutus.jsp";
		company022=_SITE_URL_+"/company/mission.jsp";
	company03=_SITE_URL_+"/company/ceo.jsp";


if (logchk == 2) {
myavis=_SITE_URL_+"/myavis/my_reserve_ing.jsp";   //my avis 
}
else if(logchk==1) {  //ºñÈ¸¿øÀÏ°æ¿ì
myavis=_SITE_URL_+"/myavis/deals.jsp";   //my avis 
}
	myavis01=_SITE_URL_+"/myavis/my_reserve_ing.jsp";
		myavis011=_SITE_URL_+"/myavis/my_reserve_ing.jsp";
		myavis012=_SITE_URL_+"/myavis/my_reserve_last.jsp";
	myavis02=_SITE_URL_+"/myavis/member_modify.jsp";
	myavis03=_SITE_URL_+"/myavis/secession.jsp";
	myavis04=_SITE_URL_+"/myavis/deals.jsp";
	
	deals=_SITE_URL_+"/myavis/deals.jsp";
	
cust=_SITE_URL_+"/cust/faq.jsp";	//°í°´¼¾ÅÍ 
	cust01=_SITE_URL_+"/cust/faq.jsp";	//faq 
	cust02=_SITE_URL_+"/cust/estimate.jsp";	//°ßÀû¹®ÀÇÇÏ±â 
	cust03=_SITE_URL_+"/cust/contactus.jsp";
	cust87=_SITE_URL_+"/myavis/my_reserve_ing.jsp";
	cust88=_SITE_URL_+"/reserve/rentpay/rent_payment.jsp";
	
member=_SITE_URL_+"/member/member_agree.jsp";
login=_SITE_URL_+"/member/login.jsp";
logout=_SITE_URL_+"/member/logout.jsp";

/*util*/



sitemap=_SITE_URL_+"/etc/sitemap.jsp";
contactus=_SITE_URL_+"/etc/open_info.jsp";

recruit="http://recruit.aju.co.kr/";
partner=_SITE_URL_+"/etc/open_info.jsp";
prov="javascript:popup('/eng/etc/pop_prov.jsp','prov',710,600,'no')";
priv="javascript:popup('/eng/etc/pop_priv.jsp','priv',730,600,'yes')";
terms="javascript:popup('/eng/etc/pop_prov.jsp','prov',710,600,'no')";
legal=_SITE_URL_+"/etc/open_info.jsp";
spam="javascript:popup('/eng/etc/pop_spam.jsp','spam',462,264,'no')";
	

		
function GoUrl(name, win) {

	if (name == null) {
			alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.");
			return;	
	} else {
		if (win == null) {
			if(name.indexOf("(") != -1) 	eval(name);
			else									document.location.href = eval(name);
		} else {
				window.open(eval(name), win);
		}
	}
}
//--------------------------------------------------------------


//1Depth Menu rollOn 
function ImgPreLoad(imgTitle, imageNum) {
		imageNum++;
		rollOn = new Array(imageNum);
		rollOff = new Array(imageNum);
		for (j = 1; j <= imageNum; j++) {
			if (j < 10) {
				tmp = "0";
			} else {
				tmp ="";
			}
			rollOn[j] = new Image();
			rollOn[j].src = imgTitle + tmp + j + "_on.gif";
			rollOff[j] = new Image();
			rollOff[j].src = imgTitle + tmp + j + ".gif";
		}
	}
	function imgOn(Num) {
    if (rollOn[Num] != null) {	
				document["T"+Num].src = rollOn[Num].src;
		}
	}
	function imgOff(Num) {
		if (rollOn[Num] != null) {
			if (Num != _MCurrentOn) {
				document["T"+Num].src = rollOff[Num].src;
			}
      else {  
      document["T"+Num].src = rollOn[Num].src;
      }
	}
}

function PreImgLoad(Title, imgNum) {
		imgNum++;
		rollOver = new Array(imgNum);
		rollOut = new Array(imgNum);
		for (i = 1; i <= imgNum; i++) {
			if (i < 10) {
				tmp = "0";
			} else {
				tmp ="";
			}
			rollOver[i] = new Image();
			rollOver[i].src = Title + tmp + i + "_on.gif";
			rollOut[i] = new Image();
			rollOut[i].src = Title + tmp + i + ".gif";
		}
	}
	function imgOver(Num) {
    if (rollOver[Num] != null) {	
				document["S"+Num].src = rollOver[Num].src;
		}
	}
	function imgOut(Num) {
		if (rollOver[Num] != null) {
			if (Num != _SCurrentOn) {
				document["S"+Num].src = rollOut[Num].src;
			}
      else {  
      document["S"+Num].src = rollOver[Num].src;
    		 }
		}
	}
	
function BodyOnLoad() {
imgOff(_MCurrentOn);
}

<!-- [Á¡¼± ¾ø¾Ö±â] ½ÃÀÛ ###########################################################################-->
function allblur() {
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
}
document.onfocusin = allblur;
<!-- [Á¡¼± ¾ø¾Ö±â] ³¡ ###########################################################################-->


// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function ObFlashW(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
	if(vars==null) 	vars='';
	if(bg==null) 	bg='#FFFFFF';
	if(win==null) 	win='transparent';


	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
	
	
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}

//Popup 		
function popup(Fn,Win, X, Y, Scroll){
l = (screen.width) ?	(screen.width- X) / 2	: 0;
t = (screen.height) ?	(screen.height- Y) / 2 : 0;	
	NewWindow=window.open(Fn,Win,'width='+X+',height='+Y+',top='+t+',left='+l+',scrollbars='+Scroll+',toolbar=no,location=no,directories=no,status=no,resizable=no,menubar=no');
}


//iframe ±æÀÌ ´Ã¾î³ª±â
function resizeHeight(fr) {
  fr = typeof fr == 'string' ? document.getElementById(fr) : fr;
  fr.setExpression('height',detail.document.body.scrollHeight);
}
function resizeHeight2(fr) {
  fr = typeof fr == 'string' ? document.getElementById(fr) : fr;
  fr.setExpression('height',clearance.document.body.scrollHeight);
}

// Å¾¹öÆ°½ºÅ©·Ñ
function goTop(orix,oriy,desx,desy) {
		var Timer;
		var winHeight = document.body.scrollTop;
		if(Timer) clearTimeout(Timer);
		startx = 0;
		starty = winHeight;
		if(!orix || orix < 0) orix = 0;
		if(!oriy || oriy < 0) oriy = 0;
		var speed = 7;
		if(!desx) desx = 0 + startx;
		if(!desy) desy = 0 + starty;
		desx += (orix - startx) / speed;
		if (desx < 0) desx = 0;
		desy += (oriy - starty) / speed;
		if (desy < 0) desy = 0;
		var posX = Math.ceil(desx);
		var posY = Math.ceil(desy);
		window.scrollTo(posX, posY);
		if((Math.floor(Math.abs(startx - orix)) < 1) && (Math.floor(Math.abs(starty - oriy)) < 1)){
			clearTimeout(Timer);
			window.scroll(orix,oriy);
		}else if(posX != orix || posY != oriy){
			Timer = setTimeout("goTop("+orix+","+oriy+","+desx+","+desy+")",15);
		}else{
			clearTimeout(Timer);
		}
	}	

var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
  var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;
	var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
	var ne=document.getElementById==-1
	var window_height=ie? document.body.clientHeight : window.innerHeight
	var window_height1=ne? document.getElementById.clientHeight : window.innerHeight

  if ( bNetscape4plus ) {
    yMenuFrom   = document["divMenu"].top;
    yMenuTo     = top.pageYOffset  + window_height - 130;
  }
  else if ( bExplorer4plus ) {
    yMenuFrom   = parseInt (divMenu.style.top, 10);
    yMenuTo     = document.body.scrollTop  + window_height - 130;
  }

  timeoutNextCheck = 500;

  if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
    setTimeout ("CheckUIElements()", timeoutNextCheck);
    return;
  }

  if ( yButtonFrom != yButtonTo ) {
    yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
    if ( yButtonTo < yButtonFrom )
      yOffset = -yOffset;

    if ( bNetscape4plus )
      document["divLinkButton"].top += yOffset;
    else if ( bExplorer4plus )
      divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

    timeoutNextCheck = 10;
  }
  if ( yMenuFrom != yMenuTo ) {
    yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
    if ( yMenuTo < yMenuFrom )
      yOffset = -yOffset;

    if ( bNetscape4plus )
      document["divMenu"].top += yOffset;
    else if ( bExplorer4plus )
      divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

    timeoutNextCheck = 10;
  }

  setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function OnLoad()
{
  var y;
  if ( top.frames.length )
  if ( bNetscape4plus ) {
    document["divMenu"].top = top.pageYOffset + 135;
    document["divMenu"].visibility = "visible";
  }
  else if ( bExplorer4plus ) {
    divMenu.style.top = document.body.scrollTop + 135;
    divMenu.style.visibility = "visible";
  }
  CheckUIElements();
  return true;
}

/************************************************************/