User:AndyZ/footnotehelperbook.js

// //create array refB, whose contents are the parameter names for var refB = new Array refB[0]='last' refB[1]='first' refB[2]='authorlink' refB[3]='year' refB[4]='url' refB[5]='title' refB[6]='id' refB[7]='location' refB[8]='pages' refB[9]='publisher' refB[10]='language' refB[11]='accessdate' refB[12]= 'chapter'

//function generates the footnote function createFootnote{ if(document.refFormB.refOutput.value!=" " }

//hides refWindow2 layer, shows button for maxing function hide2{ document.getElementById('refWindow2').style.visibility="hidden" document.getElementById('tab1').style.visibility="hidden" document.getElementById('tab2').style.visibility="hidden" document.getElementById('maxbutton').style.visibility="visible" }

//shows refWindow2 layer, hides button for maxing function show2{ document.getElementById('refWindow2').style.visibility="visible" document.getElementById('tab1').style.visibility="visible" document.getElementById('tab2').style.visibility="visible" document.getElementById('maxbutton').style.visibility="hidden" }

//creates pop-up windows function popWindow2(theThing){ theContent="  "+theThing+"  "

if(theThing=="last") {theContent+="Last name of author"} if(theThing=="first") {theContent+="First name of author"} if(theThing=="authorlink") {theContent+="Wikilink to appropriate Wikipedia article (no brackets)"} if(theThing=="date") {theContent+="Date of publication (do not wikilink). Should be in ISO 8601 YYYY-MM-DD format."} if(theThing=="url") {theContent+="URL of book, it is online"} if(theThing=="title") {theContent+="Title of book"} if(theThing=="id") {theContent+="Id, as in ISBN number."} if(theThing=="location") {theContent+="Place of publication"} if(theThing=="pages") {theContent+="The page numbers used"} if(theThing=="publisher") {theContent+="Publisher, if there is one"} if(theThing=="language") {theContent+="Language the book is in"} if(theThing=="accessdate") {theContent+="The date of access in ISO 8601 YYYY-MM-DD format (do not wikilink)"} theContent+=" "

winName = window.open("http://en.wikipedia.org/","winName","toolbar=0, location=0, directories=0") winName.document.write(theContent) winName.document.close }

//function switch1 will switch tabs for a book citation instead of web function switch1{alert("Sorry, but the book footnote tab is still being constructed. It will probably be created by Sunday, June 11.")}

//generates the layer with the text boxes document.write('Web Book ' +'' +'X Click on the descriptions at the right of the text boxes for their definitions.' +''	+''	+' ' +' Last name ' +' First name ' +' Link to author ' +' Year of publication ' +'<input id="b4" type="text" name="url" value=""> <span onclick="popWindow2(refB[4])">URL ' +'<input id="b5" type="text" name="title" value=""> <span onclick="popWindow2(refB[5])">Title* ' +'<input id="b6" type="text" name="id" value=""> <span onclick="popWindow2(refB[6])">ISBN # ' +'<input id="b7" type="text" name="location" value=""> <span onclick="popWindow2(refB[7])">Location of publication ' +'<input id="b8" type="text" name="pages" value=""> <span onclick="popWindow2(refB[8])">Last name ' +'<input id="b9" type="text" name="publisher" value=""> <span onclick="popWindow2(refB[9])">Publisher ' +'<input id="b10" type="text" name="language" value=""> <span onclick="popWindow2(refB[10])">Language ' +'<input id="b11" type="text" name="accessdate" value=""> <span onclick="popWindow2(refB[11])">Date of access ' +'<input id="b12" type="text" name="accessdate" value=""> <span onclick="popWindow2(refB[12])">Chapter ' +' * denotes that the parameter is required ' +'<textarea name="refOutput" cols="50" rows="5"> {{cite book ' +' '       +'<span id="maxbutton" style="position:absolute; left=0; top=0; visibility:hidden; z-index=19; background:yellow; width=20px; height=20px; margin:50px"><span onclick="show2">[]  ')

//function addOnloadHook to allow the creation of a new tab in editing mode. //It can also be called upon by javascript:show2 document.write('<script type="text/javascript" src="'             + 'http://en.wikipedia.org/w/index.php?title='              + 'User:Omegatron/monobook.js/addlink.js'             + '&action=raw&ctype=text/javascript&dontcountme=s"> ');

$(function {    if(document.forms.editform) {        addLink('p-cactions', 'javascript:show2', 'footnote creater2', 'ca-datefixer', 'Quick help with footnotes', , );    } });

//