<!--
/*
'-------------------------------------------------
'-------------------------------------------------
'-- Purpose:
'--  common functions and shared JS  
'-- Notes:
'--  - 
'-- Author:	Mark Baxter mark@editNow.net
'-- Copyright (c) 2002 editNow.net
'-- Version:	see global.asa for versioning
'-------------------------------------------------
*/


/*var message="";
function clickIE() {if (document.all) {(message);return false;}}function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}*/

/*document.oncontextmenu=new Function("return false")*/
/*onMouseover="window.status='Site Map';return true;"*/

function st_1(msg){window.status=msg;}function st_2(msg){window.status='Peter Haddock Publishing - entertaining children with creative publishing';return true;}
function showPopup( url, w, h, offsetX, offsetY, rsze, scr ){
	var winLeft = (screen.width / 2) - (w/2);
	var winTop = (screen.height / 2) - (h/2);
	winLeft += offsetX;winTop += offsetY;
	var newWin;newWin = "";
	if(!newWin  || newWin.closed){
		newWin = eval('window.open(url,"newWin","resizable='+rsze+',scrollbars='+scr+',status=no,left='+winLeft+',top='+winTop+',Width='+w+'px,Height='+h+'px")');
		newWin.focus();
		newWin.resizeTo(w,h);
		newWin.moveTo(winLeft,winTop);
	}	
}

//-- general
function cookieInfo(){showPopup( '/login/cookies.asp', 480, 550, 0, 0,0,1 );}
function requestDetails(){showPopup( '/login/request_my_details.asp', 470, 450, -20, -20,0,0 );}
function askZip(){showPopup( '/whatIsAZip.asp', 480, 520, -20, -20,0,1 );}

function addToFavorite(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}

function makeHomepage(arg_){
	if(navigator.appVersion.charAt(navigator.appVersion.indexOf("MSIE") + 5) >= 5 && navigator.platform.indexOf("Win16") == -1 && navigator.platform.indexOf("Mac") == -1){
		arg_.style.behavior='url(#default#homepage)';
		arg_.setHomePage(document.location);
		arg_.href="#";
		return true;
	}else {
		return false
	}
}

var MM_contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
//MM_FlashCanPlay = false;
noFlashURL = "/noFlash.asp";

/*
function unSubscribe(){showPopup( '/register/unsubscribe.asp', 450, 400, 0, 0,0,0 )}

function popup(win){window.open(win,'','width=480,height=200,scrollbars=no,left=200,top=100');}
function openNas(){window.open("http://www.narkedat60.com", "","scrollbars=yes,resizable=yes,toolbar=yes,location=yes,status=yes,menubar=yes,");}
function checkLogin(obj){var valid=true;if(!obj.password.value||obj.password.value.length<3){valid=false;}if(!obj.username.value||obj.username.value.length<3){valid=false;}if(valid){return true}else{return false;}}
*/


//-->
