﻿/* Add to favorites Modified for IE, Opera and Firefox - Does not work with Safari */

var url = "http://www.siphawaii.com"; 
var title = "ShopInParadise-SIPhawaii.com - Coffee - Fashion - Health - Beauty - Island foods - Your Hawaiian OneStop in Paradise";

function makeLink(){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

/* Copyright - Right Click --> */

	var message1 = "Mahalo for Shopping with SIPhawaii.";
 	var message2 = " Copyright ©2007 - ©2008 SIPhawaii.";
	function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ 	alert(message); return false; } 
	if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { 	alert(message1+message2); 	return false; } } 
	document.onmousedown = rtclickcheck;

/*Aloha Good morning, afternoon, evening */
/*document.write(aloha())*/
function aloha(){
	now = new Date();
	theHour = now.getHours();
	if (theHour < 12)      { greeting = '<font color="#0033CC" face="Bookman Old Style" size="3">E komo mai and Aloha kakahiaka - <font face="Verdana" size="2">Welcome and Good morning.'; }
	else if (theHour < 18) { greeting = '<font color="#0033CC" face="Bookman Old Style" size="3">E komo mai and Aloha auinala - <font face="Verdana" size="2">Welcome and Good afternoon.'; }
	else                   { greeting = '<font color="#0033CC" face="Bookman Old Style" size="3">E komo mai and Aloha ahiahi - <font face="Verdana" size="2">Welcome and Good evening.'; }
	
	return(greeting)
}


var win = null;

function SIPVerify(wizpage, wizname, w, h, scroll){
LeftPosition = (screen.width) ? (screen.width-w)/1 : 100;
TopPosition = (screen.height) ? (screen.height-h)/1 : 100;
settings = 'height=' + h + ',width=' + w + ',top= 1000,' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',noresizable'
win = window.open(wizpage, wizname, settings)
}




/* JAVA CODE FOR PAGE BACK AN FORWARD; PAGE REFRESH TO BE PLACED IN HTML CODE
<a href="javascript:history.back(1)" OnMouseOver="window.status=''; return true">back</a> | 
<a href="javascript:location.reload(true)">refresh</a> | 
<a href="javascript:history.forward(1)" OnMouseOver="window.status=''; return true">forward</a> >>
*/

