// JavaScript Document
textarray = new Array(
	q1=new Array('People are taking shorter holidays','People are taking longer holidays','A &amp; C','B &amp; C'),
	q2=new Array('The tourist','The attraction','The travel agent','Hospitality','None of the above'),
	q3=new Array('would not be included','would have some aspects that are TOTALLY dedicated to tourism','is run by Teamsters','is considered only PARTIALLY involved with tourism','none of the above'),
	q4=new Array('Canada','Mexico','the Caribbean','a, b & c','None of the above'),
	q5=new Array('by geography \(domestic, regional, and international travelers\)','by how long one spends \(time\) away from home','by the number of miles ones travels','by purpose of the trip','all of the above'),
	q6=new Array('health travel','government travel','religious travel','travel associate with major sporting events, such as the Olympics','none of the above'),
	q7=new Array('Airlines','hotel rooms','cruise tours','package tours','none of the above'),
	q8=new Array('determined from childhood','awareness','a marketing effort','a & b','b & c'),
	q9=new Array('one\'s culture','one\'s reference groups','one\'s self concept','a &amp; b','a, b & c'),
	q10=new Array('Tourism which operates within its limits','Tourism which reflects the design and character of an area','Tourism which promotes market globalization','Tourism which is integrated into local, regional and national planning','Tourism which employs locals and uses local resources'),
	q11=new Array('Holiday Inn website','Expedia','American Airlines website','A & B','A & C'),
	q12=new Array('Travelers and Marketers','Destination Management Organizations and Certifications','Sustainable tourism and Media','attractions and visitor services','buyers and sellers'),
	q13=new Array('Meetings','Festivals ','Expos','Tours','Weddings'),
	q14=new Array('Showcase a product.','Celebrate a life cycle event.','commemorate an occasion','For fun and profit. ','All of the above'),
	q15=new Array('events generate a lot of money','Attendees spend tourist dollars on items like gas and food','to generate publicity for the city','A & B','A & C'),
	q16=new Array('tourists travel patterns','transportation advances','technological innovations','socio-cultural factors','weather patterns'),
	q17=new Array('Savings & Loan failure','Economic slow down due to the gulf war ','Economic recession due to 9/11','A & B','A & B & C'),
	q18=new Array('Political pressure','Differing political systems','variations in definitions and facilities','conflict over who would pay for the system'),
	q19=new Array('a slang term for the rate you receive for \'racking up\' frequent flyer points','the official room rate','the average rate charged to all guests','the rate for the room and price of an average dinner','the room rate charged on line'),
	q20=new Array('the systematic process by which we interview, collate and analyze information on tourism.','the systematic process by which we review existing materials, and analyze information on tourism.','the systematic process by which we review the library materials available for tourism.','the systematic process by which we gather, organize, and analyze information on tourism.',' the systematic process by which we meet and educate staff and peers on tourism'),
	q21=new Array('learn something about the larger population from which the sample has been drawn','keep costs down','to minimize risk','to demonstrate that the work is complete ','aid in future surveys'),
	q22=new Array('the necessity of converting currencies','calculating labor involved','the extensive use of small and medium enterprises rather than large conglomerates','the lack of a formal tourism industry in small towns','the traditional way (production or supply)of defining an industry'),
	q23=new Array('The weight of fuel, cargo and passengers','The number of passengers carried on a flight','How many flights each airline will take','the number of passenger miles flown','How much fuel is required to fly a certain route'),
	q24=new Array('The profit on each route based on the number of seats filled','the pricing of fares to take advantage of customers','the pricing of fares on a flight to take advantage of the specific demand characteristics of that flight','the pricing of fares on a flight to take advantage of the current fuel prices','The ratio of flight attendants to passengers flying'),
	q25=new Array('Begging','court decree','law','regulations','treaties')
);
ques = new Array('Which statement(s) is (are) true regarding current tourism market trends?','At the center of Gunn\'s model is:','In WTO\'s SICTA, the construction sector:','The most important tourism market for the U.S. is','Tourism demand is analyzed:','During the middle ages the primary travel that prevailed was','Consolidators broker','The difference between a need for travel and a want for travel is','Interpersonal factors that influence travel behavior include','Which of the following is NOT a characteristic of sustainable tourism?','Indirect distribution includes:','The two key elements which create destinations are:','The event industry covers all BUT the following:','Special events can be held to:','Why do cities have convention centers?','The development of the lodging industry has grown based on all BUT which of the following:','Activities and trends which have impacted the lodging business recently include:','Various attempts have been made to create a uniform hotel classification system. They attempts have failed due to:','A Rack Rate is:','Tourism research is defined as:','A "sample survey" is a method of gathering information from a number of individuals, called the "sample" to','One of the main difficulties in measuring the economic impact of the tourism industry is:','Load Factor is defined as:','Yield management refers to:','Instruments of public policy include all BUT the following:');

function questionsadd(num)
{
	document.write("<tr class=\'bggrey\'><td width=100 height=20px; align=center>Question "+(num+1)+"</td><td>Multiple Choice</td><td width=20% aling=center>4 points</td></tr>")
	document.write("<tr><td valign=middle align=center>&nbsp;&nbsp;</td><td colspan=\'2\'><div class=\'question\'>"+ques[num]+"<br><br>");
//		document.write("<div class=\'answer\'>")
			for(i=0;i<textarray[num].length;i++)
			{
				document.write("<input name=\'q"+(num+1)+"\' type=\'radio\' class=\'radio\'>"+textarray[num][i]+"<br>");
			}
//		document.write("</div>");
	document.write("</div>");
	document.write("<p></p>&nbsp;&nbsp;</td></tr>");
}
function addquestion(num)
{
	var point=0;
	if(textarray[num][answers[num]] == textarray[num][correctans[num]])
	{
		source = "<img src='../images/check.gif' alt='Y'>";
		sourceleft = "<img src='../images/grade-correct_u.gif' alt='Y'>"
		point=4;
	}
	else
	{
		source = "<img src='../images/x.gif' alt='X'>";
		sourceleft = "<img src='../images/grade-incorrect_u.gif' alt='X'>"		
	}
	document.write("<tr class=\'bggrey\'><td width=20% height=20px; align=center>Question "+(num+1)+"</td><td>Multiple Choice</td><td width=20% aling=center>"+point+" of 4 points</td></tr>")
	document.write("<tr><td valign=middle align=center>"+sourceleft+"</td><td colspan=\'2\'>"+ques[num]+"<br><br><br>");
	if(answers[num]!=9)
		document.write("<strong>Selected Answer:&nbsp;&nbsp;&nbsp;</strong>"+source+"&nbsp;&nbsp;"+textarray[num][answers[num]]);
	else
		document.write("<strong>Selected Answer:&nbsp;&nbsp;&nbsp;</strong>"+source+"&nbsp;&nbsp;[None Given]");
	document.write("<p></p>");
	document.write("<strong>Correct Answer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong>"+"<img src='../images/check.gif' alt='Y'>"+"&nbsp;&nbsp;"+textarray[num][correctans[num]]);
	document.write("<p></p>&nbsp;&nbsp;</td></tr>");
}
function slicecookie(value)
{
	for(i=0;i<value.length;i++)
	{
		answers[i]=parseInt(value.slice(i,i+1));
	}
	//alert(value);
}

function setcookie(cookieName,cookieValue,nDays) 
{
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
// document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString();
document.cookie=cookieName+"="+cookieValue+"; expires=Monday, 04-Apr-2010 05:00:00 GMT;path=/";
}

function getcookie(name) 
{
	var cookieFound = 0;
    var start = 0;
    var end = 0;
    var CookieString = document.cookie;
    var i =0;
    while (i <= CookieString.length) 
	{
    	start = i;
    	end = start + name.length;
        if (CookieString.substring(start,end) == name) 
		{
        	cookieFound = true;
            break;
        }
        i++;
	}
    if (cookieFound) 
	{
    	start = end + 1;
        end = document.cookie.indexOf(";",start);
        if (end < start)
        	end = document.cookie.length;
		return document.cookie.substring(start,end);
	}
    return "";
}

