var myfar;

var mytitle;

myfar="http://www.openlock24hrs.com.hk";

mytitle="祥安24小時鎖類水電服務中心";

function favority() {
	if (navigator.appName!="Netscape"){
		window.external.AddFavorite(myfar, mytitle);
	}else{
		window.location = myfar;
	}
}

function right(e) {
	if (navigator.appName =='Netscape'&&
		(e.which ==3|| e.which ==2))
		return false;
	else if (navigator.appName == 'Microsoft Internet Explorer' &&
		(event.button == 2|| event.button ==3)) {
		alert("Don't Copy. Thanks!");
		return false;
	}
	return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

var msg="祥安(全港)廿四小時 - 鎖類．水電．通渠 (電話﹕2567 4459 / 9045 6694 輝)   Cheung On 24 Hours Locksmith Electrical & Plumbing Centre (Tel: 2567 4459 / 9045 6694 輝) ";
var interval = 100;
var spacelen = 120;
var space10=" ";
var seq=0;
function Scroll() {
len = msg.length;
window.status = msg.substring(0, seq+1);
seq++;
if ( seq >= len ) { 
seq = spacelen; 
window.setTimeout("Scroll2();", interval );
}
else
window.setTimeout("Scroll();", interval );
}
function Scroll2() {
var out="";
for (i=1; i<=spacelen/space10.length; i++) out += space10;
out = out + msg;
len=out.length;
window.status=out.substring(seq, len);
seq++;
if ( seq >= len ) { seq = 0; };
window.setTimeout("Scroll2();", interval );
}

function YY_Mousetrace(evnt) { //v1.2 copyright (c)1998 Yaro von Flocken
 if (yyns4)

  {if (evnt.pageX) {yy_ml=evnt.pageX;  yy_mt=evnt.pageY;}  }
 else{
   yy_ml=(event.clientX + document.body.scrollLeft);
   yy_mt=(event.clientY + document.body.scrollTop);
 }
 if (yy_tracescript)eval(yy_tracescript)
}

function m()
{
document.all.cursor.style.left=yy_ml+10
document.all.cursor.style.top=yy_mt+10
}

var yyns4=window.Event?true:false; var yy_mt = 0; var yy_ml = 0;
if (yyns4) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = YY_Mousetrace;
yy_tracescript = 'm()';

function mailpage()
{
mail_str = "mailto:?subject= 轉寄郵件： " + "祥安24小時開鎖換鎖水電服務中心";
mail_str += "&body= 祥 安 2 4 小 時 開 鎖 換 鎖 水 電 服 務 中 心" + " [Cheung On 24 Hours Locksmith Electrical and Plumbing Service Centre] ";
mail_str += "　Website：" + "http://www.openlock24hrs.com.hk (持牌安裝．維修．設計．保養)"; 
location.href = mail_str;
}

function GookieVal(offset) {  
var endstr = document.cookie.indexOf (";", offset);  
if (endstr == -1)  
endstr = document.cookie.length;  
return unescape(document.cookie.substring(offset, endstr));  
}  
  
function Gookie(name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {  
var j = i + alen;  
if (document.cookie.substring(i, j) == arg)  
return GookieVal (j);  
i = document.cookie.indexOf(" ", i) + 1;  
if (i == 0) break;  
}  
return null;  
}  
  
function Sookie(name, value) {  
var argv = Sookie.arguments;  
var argc = Sookie.arguments.length;  
var expires = (argc > 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 = name + "=" + escape (value) +  
((expires == null) ? "" : ("; expires="  
+ expires.toGMTString())) +  
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +  
((secure == true) ? "; secure" : "");  
}  
  
function Dookie(name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = Gookie (name);  
document.cookie = name + "=" + cval + "; expires="  
+ exp.toGMTString();  
}  
document.write("<center><font size=\"2\">"); 
var expdate = new Date();  
// 設定期限為一年後  
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));  
if(!(visits = Gookie("3wave"))) {visits = 1;  
Sookie("3wave", visits, expdate, "/", null, false);  
document.write("歡迎光臨! 您第 " + visits + " 次光臨本站"); 
}  
else{  
// 將到站次數累加一次  
visits++;   
Sookie("3wave", visits, expdate, "/", null, false);  
document.write("歡迎光臨! 您第 " + visits + " 次光臨本站");  
document.write("</font></center>"); 
}  

if (document.all)
document.body.style.cssText="border:12 ridge purple"

function GoToHome(strURL) {
	window.location.href = "http://www.openlock24hrs.com.hk/" + strURL;	
}

function GoToURL(strURL) {
	window.location.href = strURL;	
}
