var mydate=new Date()
var year=mydate.getYear()
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()

var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function show5(){
 if (!document.layers&&!document.all)
 return
 var Digital=new Date()
 var hours=Digital.getHours()
 var minutes=Digital.getMinutes()
 var seconds=Digital.getSeconds()
 var dn="AM" 
 if (hours>12){
 dn="PM"
 hours=hours-12
 }
 if (hours==0)
 hours=12
 if (minutes<=9)
 minutes="0"+minutes
 
 if (seconds<=9)
 seconds="0"+seconds
//change font size here to your desire
myclock="<font size='-1' face='Verdana' color='white' align='right'><b>"+dayarray[day]+" "+montharray[month]+" "+daym+", "+year+" @ "+hours+":"+minutes+":"+seconds+" "+dn+"</b></font>"
if (document.layers){
document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if (document.all)
liveclock.innerHTML=myclock
setTimeout("show5()",1000)
}

function readThatdisclaimer() {
	newWindow = window.open('disclaimer.html','disclaimer','width=550,height=470','toolbar=no,location=no,scrollbars=no')
}

function updateParent(newURL){
	opener.window.location = newURL
}

function Forums() {
	updateParent('http://www.pupiline.net/cgi-bin/newforum/dcforum/dcboard.cgi')
	closeWindow()
	}
	
function closeWindow() {
	newWindow = window.open('disclaimer.html', 'disclaimer', 'toolbar=no', 'location=no', 'scrollbars=no', 'width=200', 'height=300')

	if (newWindow && !newWindow.closed){
		newWindow.close()
		}
}

function setCookie() {
	whatClicked="accept"
	WhatClicked = document.cookie.split("=")[1]
	document.cookie="you clicked "+whatClicked+" at pupiline.net"
}

function whenWasIlastUpdated(){
document.write(document.lastModified) ;
}


function playCanoe() {
	newWindow = window.open('canoe.html',
'win1','width=460,height=400,')
}

function playBreakout() {
	newWindow = window.open('breakout.html',
'win2','width=466,height=457,')
}

function playRockwar() {
	newWindow = window.open('rockwar.html',
'win2','width=400,height=450,')
}

function playdaComp(page) {

	newWindow = window.open((page + '.html'),
'compwin','width=500,height=500')
}


function closeWindowforDaComp() {
	newWindow = window.open('dacomp.html',
'win2','width=500,height=450')

	if (newWindow && !newWindow.closed){
		newWindow.close()
		}
}

function openDefHits() {
window.open("defhits.html","DefiningHits","scrollbars,height=308,width=325");
}

function NewWindow(mypage, myname, w, h, scroll) { 
var winl = (screen.width - w) / 2; 
var wint = (screen.height - h) / 2; 
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no' 
win = window.open(mypage, myname, winprops) 
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
}

function goPager(URL) {
	var winleft = (screen.width - 520) / 2; 
	var wintop = (screen.height - 320) / 2; 

	var Pager = window.open("http://my.pupiline.net/","pagerwin","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=520,height=320,left="+winleft+",top="+wintop);
	Pager.focus();
}

function openCompetition(CompID) {
var winl = (screen.width - 450) / 2; 
var wint = (screen.height - 300) / 2; 
winprops = 'height=300,width=450,top='+wint+',left='+winl+',scrollbars=yes,resizable=no' 
win = window.open('http://feedback.pupiline.net/competitions/index.html?fuseaction=Popup&CompID='+CompID, 'Competition', winprops) 
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 

}
