var appletwidth=449;			//Applet-bredde
var appletheight=540;			//Applet-højde
//	-- Farver --
var bgcolor ="E0E0E0";			//Baggrund			Default: "E0E0E0"
var bordercolor ="c0c0c0";		//Ramme				Default: "FFFFFF"
var buttoncolor ="e0e0e0";		//Knapper			Default: "C0C0C0"
//	-- Felt-farver --
var cluecolor ="F0F0F0";		//Ledeord			Default: "F0F0F0"
var fieldcolor ="FFFFFF";		//Felter			Default: "FFFFFF"
var cursorfieldcolor ="C0C0C0";	//Aktuelt felt		Default: "C0C0C0"
var cursorwordcolor ="E0E0E0";	//Aktuelt ord		Default: "E0E0E0"
//	-- Bogstav-farver --
var okguesscolor ="000000";		//Korrekt bogstav	Default: "000000"
var badguesscolor ="C00000";	//Forkert bogstav	Default: "C00000"
var cluetextcolor ="000000";	//Ledeord			Default: "000000"
var keytextcolor ="C00000";		//Nøgleords-tal		Default: "000000"
//  -- Ved korrekt løsning --
var fanfare ="yahoo1.au";		//Lyd ved løsning	Default: ""
var tillykkescript = "ShowPage"	//Javascript som kaldes ved korrekt løsning. Default: ""
//	-- Filplaceringer --
var appletter = "./appletter"	//Mappe med krydsordsappletter
var PDFer = "./dag-pdf"		//Mappe med krydsord i PDF-format

// ---------------------------- Alle normale indstillinger herover -----------------------------



function PutXword(){
	document.writeln('	<applet code='+ClassOfToday()+' codebase="'+appletter+'"  width='+appletwidth+' height='+appletheight+'>')
	document.writeln('        <param name="buttoncolor" value="'+buttoncolor+'">')
	document.writeln('        <param name="bgcolor" value="'+bgcolor+'">')
	document.writeln('        <param name="bordercolor" value="'+bordercolor+'">')
	document.writeln('        <param name="cluecolor" value="'+cluecolor+'">')
	document.writeln('        <param name="fieldcolor" value="'+fieldcolor+'">')
	document.writeln('        <param name="cursorfieldcolor" value="'+cursorfieldcolor+'">')
	document.writeln('        <param name="cursorwordcolor" value="'+cursorwordcolor+'">')
	document.writeln('        <param name="okguesscolor" value="'+okguesscolor+'">')
	document.writeln('        <param name="badguesscolor" value="'+badguesscolor+'">')
	document.writeln('        <param name="cluetextcolor" value="'+cluetextcolor+'">')
	document.writeln('        <param name="keytextcolor" value="'+keytextcolor+'">')
	document.writeln('        <param name="fanfare" value="'+fanfare+'">')
	document.writeln('        <param name="solvedscript" value="'+tillykkescript+'">')
	document.writeln('    </applet>')
}

function PutPDF(){
	document.writeln('<a href="' + PDFer + '/' + PDFOfToday() + '" target=_blank>Hent i PDF-format</a>')
}


// ---------------------------- Datofusk Herfra
// ---------------------------- Omdøb og brug Original*** -funktionerne i stedet
function ClassOfToday(){
	var now = new Date()
	var theday = "" + now.getDate()
	if (theday.length == 1) {theday = "0" + theday}
	var themonth = "" + eval(now.getMonth()+1)
	if (themonth.length == 1) {themonth = "0" + themonth}
	var theyear = now.getYear()
	if (theyear < 1900){theyear=eval(theyear+1900)}
	return("cw200506"+theday+".class")
}

function PDFOfToday(){
	var now = new Date()
	var theday = "" + now.getDate()
	if (theday.length == 1) {theday = "0" + theday}
	var themonth = "" + eval(now.getMonth()+1)
	if (themonth.length == 1) {themonth = "0" + themonth}
	var theyear = now.getYear()
	if (theyear < 1900){theyear=eval(theyear+1900)}
	return("cw200506"+theday+".pdf")
}
// ---------------------------- Datofusk Hertil

function OriginalClassOfToday(){
	var now = new Date()
	var theday = "" + now.getDate()
	if (theday.length == 1) {theday = "0" + theday}
	var themonth = "" + eval(now.getMonth()+1)
	if (themonth.length == 1) {themonth = "0" + themonth}
	var theyear = now.getYear()
	if (theyear < 1900){theyear=eval(theyear+1900)}
	return("cw"+theyear+themonth+theday+".class")
}

function OriginalPDFOfToday(){
	var now = new Date()
	var theday = "" + now.getDate()
	if (theday.length == 1) {theday = "0" + theday}
	var themonth = "" + eval(now.getMonth()+1)
	if (themonth.length == 1) {themonth = "0" + themonth}
	var theyear = now.getYear()
	if (theyear < 1900){theyear=eval(theyear+1900)}
	return("cw"+theyear+themonth+theday+".pdf")
}



function Overskrift(){
	var now = new Date()
	var theday = "" + now.getDate()
	if (theday.length == 1) {theday = "0" + theday}
	var themonth = "" + eval(now.getMonth()+1)
	if (themonth.length == 1) {themonth = "0" + themonth}
	var theyear = now.getYear()
	if (theyear < 1900){theyear=eval(theyear+1900)}
	document.writeln("Dagens krydsord "+theday+"/"+themonth+" - "+theyear)
}


function MayScriptString(){
	if (tillykkescript.lenght != 0){
		return ("MAYSCRIPT")
	}
}

var _w = null

function ShowPage(kw){
	//Test af applet-kald til JavaScript 
	//alert ("Tadaaaaaa du fandt nøgleordet: " + kw )
	keyword=kw
	_w =window.open("tadaaaa.shtml")
}
