// JavaScript Document
/*
Copyright by Audi 2006
http://audi.tw
http://www.carousel.com.tw
歡迎應用於無償用途散播，並請勿移除本版權宣告

*/

var omitformtags=["input", "textarea", "select"];
function disableselect(e){for (i = 0; i < omitformtags.length; i++){if (omitformtags[i]==(e.target.tagName.toLowerCase()))return;}return false}
function reEnable(){
	return true
}
document.write('<div style="position:absolute;visibility:visible;top:-3000px;left:-3000px;"><form name="_hiddenFrom"><input type="text" value="喔喔!你按Ctrl-A喔!" name="_hiddenText"></form></div>');

/*if (typeof document.onselectstart=="undefined"){
	document.onmousedown=disableselect;
	document.onmouseup=reEnable;
}else{
	document.onmousedown=new Function("return false");
	document.onmouseup=new Function("return false");
}*/
document.onselectstart=new Function("return false");
document.onselect=new Function("return false");
document.oncontextmenu=new Function("return false");
//document.onload=document._hiddenFrom._hiddenText.focus();

//<![CDATA[
var tips; var theTop = 120;/*這是默認高度*/ var old = theTop;
function initFloatTips() {
  tips = document.getElementById('floatTips');
  if(tips!=null){
    moveTips();
  }
};
function moveTips() {
  var tt=50;
  theTop = 120;
  var pos;
  if (window.innerHeight) {
    pos = window.pageYOffset
  }
  else if (document.documentElement && document.documentElement.scrollTop) {
    pos = document.documentElement.scrollTop
  }
  else if (document.body) {
    pos = document.body.scrollTop;
  }
  pos=pos-tips.offsetTop+theTop;
  pos=tips.offsetTop+pos/10;
  if (pos < theTop) pos = theTop;
  if (pos != old) {
    tips.style.top = pos+"px";
    tt=10;
  }
  old = pos;
  setTimeout(moveTips,tt);
}
//!]]>
