/***********************************************
* 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 :: Solutions already corrected by Luis:
var correctchoices=new Array()
correctchoices[1]='b' //question 1 solution
correctchoices[2]='a' //question 2 solution, and so on.
correctchoices[3]='c'
correctchoices[4]='c'
correctchoices[5]='d'
correctchoices[6]='b'
correctchoices[7]='d'
correctchoices[8]='b'
correctchoices[9]='b'
correctchoices[10]='a'

//need correct answers

var descriptions=new Array()
descriptions[1]='The term Web 2.0 has been latched onto as a way to express the "next generation" of the World Wide Web.  It was originally coined to describe the progression of the Web to a software platform where much of our work and life-work is done with web-based programs rather than local programs on our own computers.' //answer descriptions.
descriptions[2]='Nielsen is now known as “NielsenBuzzmetrics” after purchasing a majority share in Buzzmetrics, an online word-of-mouth tracking and analysis company.  Intelliseek is also part of the triangle.' //question 2 solution, and so on.
descriptions[3]='Mashups are combining data, content or features from one or more web site or web-based service to create an entirely new one. Just one popular mashup site, HousingMaps.com. combines housing listings from Craigslist with Google Maps.  Quite a useful tool!.'
descriptions[4]='With the popularity of RSS  - Really Simple Syndication – lots of new applications called "feed readers" have cropped up that  gather and display content delivered from RSS web feeds.  Some are web-based and others are installed on your computer, but the purpose of a feed reader is to aggregate your RSS subscriptions into one place.'
descriptions[5]='Newsvine combines news from traditional news wire services with news from around the "blogosphere" and from online citizen "newspapers."'
descriptions[6]='Reuters is allowing "ordinary" websites to show video from the Reuters brfeaking news feeds.  You don’t need to be a broadcast news outlet anymore.  Don’t let us hear you say the news business isn’t changing!.'
descriptions[7]='The Brits just love their texting!  The Mobile Data Association is estimating that the fast-typing Britons are sending 100 million messages each day.  But they aren’t alone – most other countries in Europe and Asia are keeping pace.'
descriptions[8]='Talking Street is a series of mobile phone tours of selected cities recorded by appropriate celebrities for playback over your own mobile phone.'
descriptions[9]='Google, of course!  Google is moving into traditional advertising mediums.  Radio via dMarc Broadcasting is just one of them.  Google is also experimenting with print advertising.'
descriptions[10]='The Washington Post’s Remix project encourages non-commercial use of its content feeds in other applications or content sources with the purpose of creating new uses and perhaps new business models for The Post, which is watching the experiment closely'


/////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.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()
}

