/***********************************************
* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com)
* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com
* This notice and footnote must stay intact for use
* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code
***********************************************/

//Enter total number of questions:
var totalquestions=10

//Enter the solutions corresponding to each question:
var correctchoices=new Array()
correctchoices[1]='c' //question 1 solution
correctchoices[2]='b' //question 2 solution, and so on.
correctchoices[3]='a'
correctchoices[4]='c'
correctchoices[5]='a'
correctchoices[6]='b'
correctchoices[7]='d'
correctchoices[8]='d'
correctchoices[9]='b'
correctchoices[10]='a'

var descriptions=new Array()
descriptions[1]='We no longer feel obliged to make firm plans about when and where to meet; we\'re relying on text messaging or mobile phones once we\'re in proximity by time or place to finalize our plans.' //answer descriptions.
descriptions[2]='While 98% of journalists are following/reading blogs for various activities, 53% say they use them to stimulate story ideas.' //question 2 solution, and so on.
descriptions[3]='Podcasting is a recorded audio MP3 file combined with a Really Simple Syndication (RSS) feed.'
descriptions[4]='Tagging is a folksonomy method - an unstructured, populist way of assigning keyword categorization to a document.'
descriptions[5]='In a discussion about the importance of digital media, industry strategists described emerging strategies ranging from text alerts of breaking news to complex tools such as participation in polls, and addition of photos and video to text content via mobile devices.'
descriptions[6]='Technorati is a blog search engine, reporting there are now over 13 million blogs, publishing 2,077 posts per minute.'
descriptions[7]='The Los Angeles Times launched a wikitorial this month, but has since taken it down and has hired the creator of Wikipedia to help them re-design it.'
descriptions[8]='A subscription service common on blogs to notify readers of newly posted content.  It is being used extensively on web pages as well.'
descriptions[9]='<i>I, Reporter</i> is a school created by a Poynter Institute professional aimed at teaching mainstream news outlets to effectively use citizen reporters, and to teach citizen reporters important techniques of professional reporting.'
descriptions[10]='Del.icio.us is the largest social bookmarking website, allowing anyone to share and organize bookmarks by assigning relevant tags to each.  It is a yummy resource!'


/////Don't edit beyond here//////////////////////////

function gradeit(){
var incorrect=null
for (q=1;q<=totalquestions;q++){
	var thequestion=eval("document.myquiz.question"+q)
	for (c=0;c<thequestion.length;c++){
		if (thequestion[c].checked==true)
		actualchoices[q]=thequestion[c].value
		}
		
	if (actualchoices[q]!=correctchoices[q]){ //process an incorrect choice
		if (incorrect==null)
		incorrect=q
		else
		incorrect+="/"+q
		}
	}

if (incorrect==null)
incorrect="a/b"
document.cookie='q='+incorrect
if (document.cookie=='')
alert("Your browser does not accept cookies. Please adjust your browser settings.")
else
window.location="../pulse/results_past2.html"
}


function showsolution(){
var win2=window.open("","win2","width=750,height=390, scrollbars")
win2.focus()
win2.document.open()
win2.document.write('<title>Take Your Pulse</title>')
win2.document.write('<body bgcolor="#FFFFFF">')
win2.document.write('<p align="center" style="font-family: arial, helvetica, san serfi; font-size: 13pt; font-weight: bold;">Take Your Pulse Answers</p>')
win2.document.write('<table border="0" cellpadding="3" cellspacing="3" width="98%" style="font-family: arial, helvetica, san serfi; font-size: 10pt;"><TR><TD>')
win2.document.write('<TR><TD align="center"><B>Question</B></TD><TD align="center"><B>Answer</B></TD><TD align="center"><B>Explanation</B></TD></TR><TR><TD align="center" valign="top">')
//win2.document.write('<TR><TD colspan="3" align="center"><HR noshade height="1"></TD></TR><TR><TD align="center" valign="top">')
for (i=1;i<=totalquestions;i++){
for (temp=0;temp<incorrect.length;temp++){
if (i==incorrect[temp])
wrong=1
}
if (wrong==1){
win2.document.write(i+"</TD><TD align='center' valign='top'><B>"+correctchoices[i].fontcolor('#EF9A31')+ "</B></TD><TD><B>" + descriptions[i].fontcolor('#EF9A31') + "</B></TD></TR><TR><TD align='center' valign='top'>")
wrong=0
}
else
win2.document.write(i+"</TD><TD align='center' valign='top'>"+correctchoices[i]+ "</TD><TD><font color='green'><i>Correct!</i></font> &#150; " + descriptions[i] + "</TD></TR><TR><TD align='center' valign='top'>")
}
win2.document.write('</TD></TR>')
//win2.document.write("<BR><small>Note: The solutions in red are the ones to the questions you had incorrectly answered.</small>")
win2.document.close()
}

