// JavaScript Document



/*FOR MAC CSS FIXES*/

/***********************************************

		* Different CSS depending on OS (mac/pc)- © Dynamic Drive (www.dynamicdrive.com)

		* This notice must stay intact for use

		* Visit http://www.dynamicdrive.com/ for full source code

		***********************************************/



			var csstype="external" //Specify type of CSS to use. "Inline" or "external"



			var mac_externalcss='css/survey4mac.css' //if "external", specify Mac css file here

			var pc_externalcss='css/survey4.css'   //if "external", specify PC/default css file here



			///////No need to edit beyond here////////////



		var mactest=navigator.userAgent.indexOf("Mac")!=-1

		if (csstype=="inline"){

				document.write('<style type="text/css">')

				if (mactest)

				document.write(mac_css)

				else

				document.write(pc_css)

				document.write('</style>')

				}

				else if (csstype=="external")

				document.write('<link rel="stylesheet" type="text/css" href="'+ (mactest? mac_externalcss : pc_externalcss) +'">')


///*for Google Bar yellow bgd in IE7*/
if(window.attachEvent)
    window.attachEvent("onload",setListeners);

  function setListeners(){
    inputList = document.getElementsByTagName("INPUT");
    for(i=0;i<inputList.length;i++){
      inputList[i].attachEvent("onpropertychange",restoreStyles);
      inputList[i].style.backgroundColor = "";
    }
    selectList = document.getElementsByTagName("SELECT");
    for(i=0;i<selectList.length;i++){
      selectList[i].attachEvent("onpropertychange",restoreStyles);
      selectList[i].style.backgroundColor = "";
    }
  }

  function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "")
      event.srcElement.style.backgroundColor = "";
}

