var str=(location.href); var number_1 = str.lastIndexOf("/") + 1 ; var number_2 = str.lastIndexOf(".") ; var myFile = str.substring(number_1, number_2) ; var myMP3 = myFile.substring(5); var myNew = " Quiz "+myMP3.replace("q-", " Question ") ; var myNew = "100 Question Written Quiz"; var myQuestion = myQuestion; function getState() { var results = getCookie("myState"); if ( results ) { var location=("NTcit5q-3" + results + ".htm"); // alert('Getting ready to open ' +location); // add in for debug // this.location.href = location; - Not here, let the page do this return(results); // returns state ID to calling getState() function } else { //can remove alert after debug // alert('\nOops!\n\nNo state value selected'); } } //This is called by above to get the correct cookie function getCookie(name) { //Without this, it will return the first value //in document.cookie when name is the empty string. if(name == '') return(''); name_index = document.cookie.indexOf(name + '='); if(name_index == -1) return(''); cookie_value = document.cookie.substr(name_index + name.length + 1, document.cookie.length); //All cookie name-value pairs end with a semi-colon, except the last one. end_of_cookie = cookie_value.indexOf(';'); if(end_of_cookie != -1) cookie_value = cookie_value.substr(0, end_of_cookie); //Restores all the blank spaces. space = cookie_value.indexOf('+'); while(space != -1) { cookie_value = cookie_value.substr(0, space) + ' ' + cookie_value.substr(space + 1, cookie_value.length); space = cookie_value.indexOf('+'); } return(cookie_value); } document.write('
'); document.write('Choose the correct answer.
'); /** 4/13/11 -- Commenting out the Flash player. Jplayer was requested for the lab **/ /** document.write(' '); **/ **/