<!-- Original:  Ricocheting (ricocheting@hotmail.com) -->
<!-- Web Site:  http://www.ricocheting.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
   }
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
   }
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
   }
}
//  End -->
<!-- Original:  CodeLifter.com (support@codelifter.com) -->
<!-- Web Site:  http://www.codelifter.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = '../forester.jpg'
Pic[1] = '../pp%200041.jpg'
Pic[2] ='../pp%200021.jpg'
Pic[3] = '../pp%200031.jpg'
Pic[4] = '../pp%200051.jpg'
Pic[5] = '../pp%200061.jpg'
Pic[6] = '../pp%200101.jpg'
Pic[7] = '../pp%200111.jpg'
Pic[8] = '../pp%200091.jpg'
Pic[9] = '../pp%200071.jpg'
Pic[10] = '../pp%200081.jpg'
Pic[11] = '../pp%200121.jpg'



// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
//  End -->
<!-- Newsletter 
function verifyMail(obj)
{
	if(obj.value.length != 0)
    {
      var str = obj.value;
      var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
      var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
	  if (!reg1.test(str) && reg2.test(str))
      {
		 // return true;
      }else
	  {
		 alert("\"" + str + "\" is an invalid e-mail!");
       	 obj.focus();
         return false;
	   }
	}
}
//----------------------   Site Function   -----------------------
	function ContactValidation(which)
	{
		if (verifyMail(which.requiredEmail)==false) return false ;
		if (checkrequired(which) == false) return false;
		return true ;
	}	
	
	function MM_openBrWindow(theURL,winName,w,h,obj) { //v2.0
	
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	winProps = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=0'
	
	  window.open(theURL+'?requiredEmail='+obj.value,winName,winProps);
	}
	function MM_openWindow(theURL,winName,w,h) { //v2.0
	
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	
	
	winProps = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=0'
	
	    window.open('',winName,winProps);
		document.forms[0].target=winName; 
		document.forms[0].action = theURL ; 
		document.forms[0].submit(); 
	  
	}
function MM_openBrWindow1(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// end-->
<!--Begin
function setCookie(val, name) {
	var expire = new Date();
	var days = 7;
	if (val == null || val.length == 0) {days = -1;}
	expire.setTime(expire.getTime() + days*24*60*60*1000);
	document.cookie = name + escape(val) + "; path=/; expires=" + expire.toGMTString();
}

function getFavoriteList(name) {
	var re = new RegExp(name);
	var idx = document.cookie.search(re);
	if (idx == -1) {return idx;} 
	else {var endIdx = document.cookie.indexOf(';',idx);
		if (endIdx == -1) {endIdx = document.cookie.length;}
		return unescape(document.cookie.substring(idx + name.length, endIdx));
	}
}

function addFavorite(num, name) {
	var re = new RegExp(num);
	var value = getFavoriteList(name);
	
	if (value == -1) {value = num + ",";} 
	else {
		if (value.search(re) == -1) { value = value + num + ",";} 
		else {return;}
	}
	setCookie(value, name);
}

function delFavorite(num, name) {
	var re = new RegExp(num + ",");
	var value = getFavoriteList(name);
	
	if (value != -1) {value = value.replace(re, "");}
	setCookie(value, name);
    alert("?????????????");
}

function changeFavorite(obj, num, name) {
	if (obj.checked) {addFavorite(num, name);}
	else {delFavorite(num, name);}
}
// HEAD?????????????????????????????????????????
function login_click(){

	//???ID?????????????
	//ID
	if (document.Form1.user_id.value.length <= 0 ) {
		alert ("ID(???????)?????????");
		return false;
	}
	//?????
	if (document.Form1.pass_wd.value.length <= 0 ) {
		alert ("??????????????");
		return false;
	}	

	if (document.Form1.check1.checked == true ) {
		// ????????ON????????
//		setCookieLogin("CheckValue", "1" );
//		setCookieLogin("atus", document.Form1.user_id.value);
//		setCookieLogin("atpw", document.Form1.pass_wd.value);

	}else{
		// ????????OFF?????????????????
//		setCookieLogin("CheckValue", "" );

	}
	
	//2003.10.14 START ?????????Cookie??????
//	setCookieNormalLogin();
	//2003.10.14 END
	
	
	//Hidden???????????
	document.Form1.action = document.Form1.hdnNextLink.value;

//	????submit???? 2003.06.09	// ?? JavaScript?Submit??? 2003.06.20 shimizu
	document.Form1.submit();

	return true;
}

function setCookieLogin(name,val){

	var expire = new Date();
	var days = 365;
	if (val == null || val.length == 0) {days = -1;}
	expire.setDate(expire.getDate() + days);
	tmp = name + "=" + escape(val) + "; path=/; expires=" + expire.toGMTString();
	document.cookie = tmp;
}

// 2003.10.10 ?????????????????????????ID???????????
function setCookieNormalLogin(){
	var tmp;
	var expire = new Date();
	var days = 365;
	
	tmp = "atusN" + "=" + escape(document.Form1.user_id.value) + "; path=/;" ;
	//expire.setDate(expire.getDate() + days);
	//tmp = "atusN" + "=" + escape(document.Form1.user_id.value) + "; path=/; expires=" + expire.toGMTString();
	document.cookie = tmp;
	
	tmp = "atpwN" + "=" + escape(document.Form1.pass_wd.value) + "; path=/;" ;
	//expire.setDate(expire.getDate() + days);
	//tmp = "atpwN" + "=" + escape(document.Form1.pass_wd.value) + "; path=/; expires=" + expire.toGMTString();
	document.cookie = tmp;
	
	
	return true;
	
}

// 2003.10.15 ???????Cookie?????
function DeleteLoginCookie(){
	var expire = new Date();
	var days = -1;
	var val = "";
	
	//?????????
	expire.setDate(expire.getDate() + days);

	//???????Cookie???
	setCookieLogin("atus", "");          //???ID??
	//tmp = "atus" + "=" + escape(val) + "; path=/; expires=" + expire.toGMTString();
	//document.cookie = tmp;
	
	setCookieLogin("atpw", "");          //???????
	//tmp = "atpw" + "=" + escape(val) + "; path=/; expires=" + expire.toGMTString();
	//document.cookie = tmp;
	
	setCookieLogin("CheckValue", "" );  //????????????????????
	//val = "0"; //???????
	//expire.setDate(expire.getDate() + 365); //???????
	//tmp = "CheckValue" + "=" + escape(val) + "; path=/; expires=" + expire.toGMTString();
	//document.cookie = tmp;
	
	setCookieLogin("myid", "");          //?????????????????ID??

	//2004.08.30 ???????????????	
	setCookieLogin("frm_myp","");		//????????????????????????????
	
	setCookieLogin("atus_mat","");		//????????????????????????????ID
	
	setCookieLogin("atpw_mat","");		//??????????????????????????????
	
	return true;
};

// 2003.10.15 ???????????Window????
function Mypage_LogOut(){

	//Cookie???
	DeleteLoginCookie();
	
	//Window????
	window.close();
	
	return true;
};
// end-->

