<!--
//*******************************************************
//*                Comment Card Engine                  *
//* This product and other products of OpinionLab, Inc. *
//* are protected by U.S. Patent No. US 6,397,192 B1    *
//* and other patents pending.                          *
//*******************************************************

// Cross frame vulnerabity fix (live)
/*
if (top != self ) 
    {
        top.location=self.location;
    }
*/
var Browser = (function(){
  var ua = navigator.userAgent;
  var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]',
  browser = {
    IE: !!window.attachEvent && !isOpera,
    Opera: isOpera,
    Chrome: ua.indexOf('Chrome') > -1,
    Safari: ua.indexOf('Safari') > -1 && ua.indexOf('Chrome') === -1,
    Firefox: ua.indexOf('Firefox') > -1 && ua.indexOf('KHTML') === -1,
    MobileSafari: /Apple.*Mobile.*Safari/.test(ua),
    Mac: ua.indexOf('Macintosh') > -1,
    Windows: ua.indexOf('Windows') > -1
  };
  var version = 0, regex, unknown = false;
  if (browser.IE) {
    regex = /msie.(\d\.\d+)/i;
    version = ua.match(regex)[1];
  }
  else if (browser.Firefox) {
    regex = /gecko.(\d+)/i;
    version = ua.match(/Firefox.(\d\.\d)/)[1];
  }
  else if (browser.Safari) {
    regex = /Version.(\d\.\d)/i;
    version = ua.match(regex)[1];
  }
  else if (browser.Chrome) {
    regex = /Chrome.(\d\.\d)/i;
    version = ua.match(regex)[1];
  }
  else if (browser.Opera) {
    regex = /opera.(\d\.\d+)/i;
    version = ua.match(regex)[1];
  }
  else {
    unknown = true
  }
  browser.Version = parseFloat(version);
  return browser;
})();

var qReq = new Array();
var alreadyCleared = new Array();
var alreadysubmitted = false;
var O_Op6=((navigator.userAgent.toLowerCase().indexOf('opera 6')>-1)||(navigator.userAgent.toLowerCase().indexOf('opera/6')>-1))?true:false;
var O_Op7=((navigator.userAgent.toLowerCase().indexOf('opera 7')>-1)||(navigator.userAgent.toLowerCase().indexOf('opera/7')>-1))?true:false;
var O_Op8=((navigator.userAgent.toLowerCase().indexOf('opera 8')>-1)||(navigator.userAgent.toLowerCase().indexOf('opera/8')>-1))?true:false;
var O_Op9=((navigator.userAgent.toLowerCase().indexOf('opera 9')>-1)||(navigator.userAgent.toLowerCase().indexOf('opera/9')>-1))?true:false;
var O_FF15=(navigator.userAgent.toLowerCase().indexOf('firefox/1.5')>-1)?true:false;
var O_FF20=(navigator.userAgent.toLowerCase().indexOf('firefox/2.')>-1)?true:false;
var O_GChrome=(navigator.userAgent.toLowerCase().indexOf('chrome/0.')>-1)?true:false;
var O_NS5up=((navigator.userAgent.toLowerCase().indexOf('mozilla')!=-1)&&(parseInt(navigator.appVersion)>=5))||O_Op6||O_Op7||O_Op8||O_Op9;
var O_NS4=(document.layers)&&(!O_Op6)&&(!O_Op7)&&(!O_Op8)&&(!O_Op9)?1:0;
var O_IE4=(document.all)&&(!O_Op6)&&(!O_Op7)&&(!O_Op8)&&(!O_Op9)?1:0;
var O_IE6=O_IE4&&navigator.userAgent.toLowerCase().indexOf('msie 6.')>-1;
var O_MAC=(navigator.appVersion.indexOf("Macintosh")>-1);
var O_IE45=(navigator.userAgent.toLowerCase().indexOf('msie 4.')>-1)&&O_MAC&&(!O_Op6)&&(!O_Op7)&&(!O_Op8)&&(!O_Op9);
var O_IE5=(navigator.userAgent.toLowerCase().indexOf('msie 5.0')>-1)&&O_MAC&&(!O_Op6)&&(!O_Op7)&&(!O_Op8)&&(!O_Op9);
var st="";var _d=document;var _w=window;
var topic_selection_mandatory = 0;
var question_required_text = '';
var ts_required_text = '';
var email_required_text = '';
var comment_required_text = '';
var comment_required_flag = false;

var _vH=(O_IE4)?"none":"hidden";var _vS=(O_IE4)?"block":"visible";
var quesNum = 0;
var notClicked = false;
var notClicked2 = false;
var ny_offset=0;
var comment_category;
var qs = document.location.href;
var fields_to_clear_on_submit = new Array();
var f_i = 0;
	
function _GPs(l){var g=(O_IE4)?eval("_d.all('o"+l+"')"):(O_NS5up||O_Op6)?eval("document.getElementById('o"+l+"')"):eval("_d.layers.o"+l);if(O_NS4&&g){return g.pageY}if(O_IE4&&g){return g.offsetTop}if(O_NS5up&&g){return g.offsetTop}}

function _Sh(l,s){var g=(O_IE4)?eval("_d.all('o"+l+"')"):eval("_d.o"+l);g=(O_NS5up)?eval("document.getElementById('o"+l+"')"):g;if(O_NS4&&g)g.visibility=(s)?_vS:_vH;if(O_IE4&&g){g.style.display=(s)?_vS:_vH;g.style.visibility=s?"visible":"hidden";}if(O_NS5up&&g)g.style.visibility=(s)?_vS:_vH}

function _Ps(l,x,y){var g=(O_IE4)?eval("_d.all('o"+l+"')"):eval("_d.o"+l);g=(O_NS5up)?eval("document.getElementById('o"+l+"')"):g;if(O_NS4&&g){g.left=x;g.top=y}if(O_IE4&&g){g.style.left=x;g.style.top=y}if(O_NS5up&&g){g.style.left=x+'px';g.style.top=y+'px'}}

function fR(n){i=0;while(i<qs.length){j=i+n.length;if(qs.substring(i,j)==n){k=qs.indexOf('&',j);return unescape(qs.substring(j+1,(k==-1)?qs.length:k))}i++}return ''}


function dec2char ( n ) {
	// converts a single string representing a decimal number to a character
	// note that no checking is performed to ensure that this is just a hex number, eg. no spaces etc
	// dec: string, the dec codepoint to be converted
	var result = '';
    if (n <= 0xFFFF) { result += String.fromCharCode(n); } 
	else if (n <= 0x10FFFF) {
		n -= 0x10000
		result += String.fromCharCode(0xD800 | (n >> 10)) + String.fromCharCode(0xDC00 | (n & 0x3FF));
    	} 
	else { result += 'dec2char error: Code point out of range: '+dec2hex(n); }
	return result;
	}

function convertDecNCR2Char ( str ) { 
	// converts a string containing &#...; escapes to a string of characters
	// str: string, the input
	
	// convert up to 6 digit escapes to characters
	str = str.replace(/&#([0-9]{1,7});/g, 
					function(matchstr, parens) {
						return dec2char(parens);
						}
						);
	return str;
	}

var firsttry = 1;

function aolresize()
{
firsttry = 0;
var myJSWindow;
var isClientBrowser = false;
var authState = 1;  // set to true initially.  for browsing, can only ever be false for aol 9.1 or above.
var isTarana = false;
if(navigator.userAgent.toLowerCase().indexOf('aol 9.1')>-1) {
    isTarana = true;
}

try{
	if (window != 0) {
		if (typeof window.external != "undefined") {
			if (typeof window.external.jsWindow != "undefined") {
				myJSWindow = window.external.jsWindow;
				   
				// following test is for AOL 9.1 only to determine authentication state.
				if (isTarana) {
					authState = myJSWindow.authState();
					//if (authState == 0){
						//document.write('User is unauthenticated.');
					//}
					//else {
						//document.write('User is authenticated.');
					//}
				}
				isClientBrowser = true;
			}
		}
		if (isClientBrowser) {
			var parentTop = window.top.screenTop;
			var parentLeft = window.top.screenLeft;
			var top = window.screenTop;
			var left = window.screenLeft;
			var xx = parentLeft - left - 80;// + 54;
			var yy = parentTop - top; // + 150;
			window.external.jsWindow.moveBy(xx,yy);
			if (authState != 0){
				var sURL = "aol://1391:48-34291";
				window.navigate(sURL);  // set width using FDO to override browser 86% size
			}
		}
		else  {
			resize(_GPs('_bottom'));
		}
	}
} catch(e) {
	resize(_GPs('_bottom'));
}
}





function resize(card_h){

    try {
        p_rating=fR('rating');
        for (i=0; i<document.CommentCard.overall.length; i++) {
            if(document.CommentCard.overall[i].value == p_rating){
                document.CommentCard.overall[i].checked=true
            }
        }
    } catch(e) {
        // nothing
    }

	walkAnchors(document.body, 10)

	if(fR('resize')=='false' || window.opener==null) return false;

	/*
	if(navigator.userAgent.toLowerCase().indexOf('aol 9.')>-1 && navigator.userAgent.toLowerCase().indexOf('aol 9.0')==-1 && firsttry==1){aolresize();return false}
	*/
	if(navigator.userAgent.toLowerCase().indexOf('aol')>-1 && firsttry==1){aolresize();return false}


	self.setResizable = true;	

	if( (navigator.userAgent.toLowerCase().indexOf('aol')==-1) && (navigator.userAgent.toLowerCase().indexOf('avant')==-1) ){
		self.moveTo((screen.width-535)/2, (screen.height-card_h-100)/2 );
	}
	
	if(O_IE4){
		self.resizeTo(535+10,192+10);
		var yPos = 192 - 10 - document.body.clientHeight; 
		var xPos = 535 - document.body.clientWidth; 
		var outerHeight = yPos + card_h; 
		var outerWidth = xPos + 535 + 10; 
		if(navigator.userAgent.toLowerCase().indexOf('msie 4.')>-1){outerHeight+=62;}
		if(navigator.userAgent.toLowerCase().indexOf('america online browser')>-1){outerHeight+=100;outerWidth+=-10;}
		if(navigator.userAgent.toLowerCase().indexOf('aol 9.')>-1){outerHeight+=200;outerWidth+=-10;}
		if(navigator.userAgent.toLowerCase().indexOf('aol 8.0')>-1){outerHeight+=-34;outerWidth+=-10}
		if(navigator.userAgent.toLowerCase().indexOf('aol 7.0')>-1){outerHeight+=-34;outerWidth+=-10}
		if(navigator.userAgent.toLowerCase().indexOf('aol 6.0')>-1){outerHeight+=15;outerWidth+=0}
		if(navigator.userAgent.toLowerCase().indexOf('aol 5.0')>-1){outerHeight+=-45;outerWidth+=0}
		
		if(navigator.userAgent.toLowerCase().indexOf('aol 9.')>-1){
			resizeTo(outerWidth,outerHeight+15);
		}
		if(navigator.userAgent.toLowerCase().indexOf('aol 10.')>-1){
			resizeTo(outerWidth,outerHeight+15);
		}
		self.resizeTo(outerWidth,outerHeight+15);
	} else {
		var yPos = 192-window.innerHeight;
		var xPos = 535-window.innerWidth;
		if(O_NS4&&!O_Op6){
			var outerWidth = 535;
			self.resizeTo(outerWidth,card_h-20);
		} else {
			var outerHeight = card_h + window.outerHeight-window.innerHeight;
			var outerWidth = 535 + window.outerWidth-window.innerWidth;
			if(navigator.userAgent.toLowerCase().indexOf('camino')>-1){outerWidth+=15}
			if(O_Op7){outerHeight+=0}
			if(O_Op8||O_Op9){outerHeight+=0}
			if(O_FF15||O_FF20){outerHeight-=12}
			if (Browser.Firefox && Browser.Version >= 3 && !Browser.Windows) {outerHeight-= 0}; //-10
			if( (Browser.Safari && Browser.Version >= 4)) outerHeight-=10;
			if(Browser.Safari && Browser.Version >= 4 && Browser.Windows) document.getElementById('CommentCard').style.margin = '0'
			if(O_GChrome){outerHeight+=45;outerWidth+=15;}
			self.resizeTo(outerWidth,outerHeight);
		}
	}
	self.setResizable = false;
	self.focus();
	setupClearList();
	
}


function walkAnchors(node, depth) {
	var MAX_NODES = 1000;	// Constant to avoid taking too long
	var count = 0;
	while (node && depth > 0) {
		count ++;
		if (count >= MAX_NODES) {
			var handler = function() {
				walkAnchors(node, depth);
			};
			setTimeout(handler, 50);
			return;
		}
		//console.log(node.tagName);
		if(node.tagName=="TEXTAREA" || node.tagName=="INPUT"){
			// second textareas
			if(typeof node.onfocus=='function') {
				if (/(clearbox)/g.test(node.onfocus) ) {
					fields_to_clear_on_submit[f_i++] = node.id + "|" + node.value;
				}
			} else if (/(answer_[0123456789]+_oth)/g.test(node.id)){
				fields_to_clear_on_submit[f_i++] = node.id + "|" + node.value;
			}
		}

		if (node.nodeType == 1) { // ELEMENT_NODE
			var skipre = /^(script|style|textarea)/i;
			if (!skipre.test(node.tagName) && node.childNodes.length > 0) {
				node = node.childNodes[0];
				depth ++;
				continue;
			}
		}
		if (node.nextSibling) {
			node = node.nextSibling;
		} else {
			while (depth > 0) {
				node = node.parentNode;
				depth --;
				if(node==null)break;
				if (node.nextSibling) {
					node = node.nextSibling;
					break;
				}
			}
		}
	}
}         


function check() {


// Extract default value for comment
var default_comment_value = '';
for(i=0; i<fields_to_clear_on_submit.length; i++){
    var fields_to_clear = fields_to_clear_on_submit[i].split("|")
    if (fields_to_clear[0]=='comments') {
        default_comment_value = fields_to_clear[1]
    }
};


// Required Content
 
// First Test for required TS
if(typeof document.CommentCard.topic_selection!='undefined' && topic_selection_mandatory==1){
	var ts = eval('document.CommentCard.answer_'+document.CommentCard.topic_selection.value);
	if(ts.value=='' || ts.value==0){
	    if (ts_required_text!='') {
	        alert(convertDecNCR2Char(ts_required_text));
	    } else {
		    alert('Please choose a topic for your comments before submitting.');
		}
	    return false;
 	} else {
 	    document.getElementById('tsText').className = '';
 	}
 }
if(typeof document.CommentCard.topic_selection!='undefined' && topic_selection_mandatory==101 && document.getElementById('comments').value!='' && document.getElementById('comments').value!=default_comment_value){
	var ts = eval('document.CommentCard.answer_'+document.CommentCard.topic_selection.value);
	if(ts.value=='' || ts.value==0){
	    if (ts_required_text!='') {
	        alert(convertDecNCR2Char(ts_required_text));
	    } else {
		    alert('Please choose a topic for your comments before submitting.');
		}
	    return false;
 	} else {
 	    document.getElementById('tsText').className = '';
 	}
 } 
if(typeof document.CommentCard.topic_selection!='undefined' && topic_selection_mandatory==2){
	var ts = eval('document.CommentCard.answer_'+document.CommentCard.topic_selection.value);
	if(ts.value=='' || ts.value==0){
		alert('Per favore seleziona un argomento prima di inviare.');
	    return false;
 	} else {
 	    document.getElementById('tsText').className = '';
 	}
 	
 }
 
// Second Test for required comment field
for(i=0; i<qReq.length; i++){
     if (qReq[i]==-1) {
            comment_required_flag = true;
            ArId = document.getElementsByName('comments');
            question_is_answered = false;
            for(j=0; j<ArId.length; j++) {
                if (ArId[j].type=='textarea' && ArId[j].value!=default_comment_value && ArId[j].value!=''){
                question_is_answered = true;
                break;
            }
            if (!question_is_answered) {
                document.getElementById('comments').className = document.getElementById('comments').className + ' reqHilite';
                        alert(convertDecNCR2Char(comment_required_text==''?'Please provide a comment in the field highlighted in red before you submit your feedback.\nThank you.':comment_required_text));
                return false;
            }
       }
   }
}
for(i=0; i<qReq.length; i++){
     if (qReq[i]==-1) {
try {
    document.getElementById('comments').className = document.getElementById('comments').className.replace(' reqHilite', '').replace(' reqQuestion', '');
} catch(e) {}
     }
}
// Third Test for required overall rating

 var DesignValue = "";
 var ContentValue = "";
 var UsabilityValue = "";
 var OverallValue = "";
 if (alreadysubmitted) return false;
 
  //Test if we have an required email category field
 if(comment_category==1&&document.CommentCard.email_address.value==''){
 	alert('Please choose a feedback category before submitting.');
	return false;
 }
 
 
 //If screen_res are eq to 0 then set it here on the card (for O-mail links mainly)
 if(document.CommentCard.width.value=='0'){
 	document.CommentCard.width.value = screen.width;
 }
 
 if(document.CommentCard.height.value=='0'){
	document.CommentCard.height.value = screen.height;
 }
 
 
 // Make sure the comment is not longer than 1000 chars
 if(typeof document.CommentCard.comments!='undefined') {
	 if (document.CommentCard.comments.value.length>1000) {
	  document.CommentCard.comments.select();
	  document.CommentCard.comments.focus();
	  alert(convertDecNCR2Char(comment_message));
	  return false;
	 }
 }
 
  var globalRating = 0.0, totalRating = 0.0;
  
  // Checking if we have CDU section	
  if(typeof document.CommentCard.content!='undefined'){
 
// Checking the Content Rating
if(typeof document.CommentCard.content[0]!='undefined'){
	 for (i=0; i<5; i++) {
	  if (document.CommentCard.content[i].checked=="1") {
	   ContentValue=document.CommentCard.content[i].value;
	   globalRating += parseInt(ContentValue);
	   totalRating += 1;
	  }
	 }
 } else {
	 ContentValue=document.CommentCard.content.value;
	 globalRating += parseInt(ContentValue);
	 totalRating += 1; 
 }
	 
// Checking the Design Rating
if(typeof document.CommentCard.design[0]!='undefined'){
 for (i=0; i<5; i++) {
  if (document.CommentCard.design[i].checked=="1") {
   DesignValue=document.CommentCard.design[i].value;
    globalRating += parseInt(DesignValue);
    totalRating += 1;
  }
 }
} else {
   DesignValue=document.CommentCard.design.value;
   globalRating += parseInt(DesignValue);
   totalRating += 1;
}

 // Checking the Usability Rating
if(typeof document.CommentCard.usability[0]!='undefined'){
 for (i=0; i<5; i++) {
  if (document.CommentCard.usability[i].checked=="1") {
   UsabilityValue=document.CommentCard.usability[i].value;
    globalRating += parseInt(UsabilityValue);
    totalRating += 1;
  }
 }
} else {
  UsabilityValue=document.CommentCard.usability.value;
  globalRating += parseInt(UsabilityValue);
  totalRating += 1;
}
 
 } else {DesignValue=""; ContentValue=""; UsabilityValue="";}
 // Checking the OverAll Rating
 
 
if(typeof document.CommentCard.overall!='undefined') {
 
 
if(typeof document.CommentCard.overall.value!='undefined'){
	OverallValue = document.CommentCard.overall.value;
} else {
 for (i=0; i<5; i++) {
  if(typeof document.CommentCard.overall[i]!='undefined'){
	  if(document.CommentCard.overall[i].checked=="1"){
		OverallValue=document.CommentCard.overall[i].value;
	  }
  }else{OverallValue="0"}
 }
}

} else { OverallValue="0" }

 if (DesignValue=="" && ContentValue=="" && UsabilityValue=="" & OverallValue =="") { 
  alert(convertDecNCR2Char(submit_message));
  document.getElementById('ovText').className = "alert";
  return false;
 } else {
 	// Check added 5/11/04, make sure global rating is integer otherwise ask again
	var avgRating = Math.round(globalRating/totalRating);
 	if (avgRating != (globalRating/totalRating) && OverallValue=="") {
 		alert(convertDecNCR2Char(submit_message));
		document.getElementById('ovText').className = "alert";
 		return false;
 	}
 }

// Fourth Test for required email field
for(i=0; i<qReq.length; i++){
        if (qReq[i]==0) {
            ArId = document.getElementsByName('email_address');
            question_is_answered = false;
            for(j=0; j<ArId.length; j++) {
                if (ArId[j].value!='' && ArId[j].type=='text'){
                question_is_answered = true;
                break;
            }
            if (!question_is_answered) {
                document.getElementById('email_span').className = 'reqHilite';
                alert(convertDecNCR2Char(email_required_text==''?'Please provide your email address in the field highlighted in red before you submit your feedback.\nThank you.':email_required_text));
                return false;
            }
        }
    }
}

try {
    document.getElementById('email_span').className = '';
} catch(e) {}

// Fifth Test for all remaining custom questions!
 for(i=0; i<qReq.length; i++){
    if (qReq[i]>1) { 
        ArId = document.getElementsByName('answer_'+ qReq[i])
        question_is_answered = false;
        for(j=0; j<ArId.length; j++) {
            if (ArId[j].value!='' && ArId[j].type=='textarea'){
                question_is_answered = true;
                break;
            }
            if (ArId[j].value!='' && ArId[j].value!=0 && ArId[j].type!='radio') {
                question_is_answered = true;
                break;
            }
            if (ArId[j].checked!='' && ArId[j].type=='radio') {
                question_is_answered = true;
                break;
            }
        }
        if (!question_is_answered) {
            document.getElementById('qid_'+ qReq[i]).className = 'reqHilite';
            alert(convertDecNCR2Char(question_required_text==''?'Please answer any questions highlighted in red before you submit your feedback.\nThank you.':question_required_text));
            return false;
        } else {
            document.getElementById('qid_'+ qReq[i]).className = '';
        }
    }
  }
  
 // Clear fields that need to be cleared!
 
 for(i=0; i<fields_to_clear_on_submit.length; i++){
 	
 	var fields_to_clear = fields_to_clear_on_submit[i].split("|")
 	if (document.getElementById(fields_to_clear[0])!= null) { 
		if (document.getElementById(fields_to_clear[0]).value == fields_to_clear[1]) document.getElementById(fields_to_clear[0]).value = '';
 	}
 	};
   
    // Make the comment blank is not modified
  if(typeof document.CommentCard.comments!='undefined'){if(!notClicked && !comment_required_flag)document.CommentCard.comments.value=''};
  alreadysubmitted = true;
  
  var overall_rating_els = document.getElementById('transOverall'), ratingLength;
  if (overall_rating_els) {
    overall_rating_els = overall_rating_els.getElementsByTagName('input');
    ratingLength = overall_rating_els.length;
    while(ratingLength--) {
      if (overall_rating_els[ratingLength].checked) {
        if (ratingLength <= 6) OverallValue = "1";
        else if (ratingLength <= 8) OverallValue = "3";
        else OverallValue = "5"
        ratingLength=0;//found a checked radio button exit out
      }
    }
    //might need to create an element for form
    var el = document.createElement('input');
    el.name = 'overall';
    el.value = OverallValue;
    el.type = 'hidden';
    document.CommentCard.appendChild(el);
  }
  
  return true;
}

function openabout() {
var _rW=screen.width;
var _rH=screen.height;
var lang = window.location.href.substring(window.location.href.indexOf('lang=')+5, window.location.href.indexOf('&time1='));
if(lang==0||lang=="0"||lang==""||lang.length>2){
	window.open('http://www.opinionlab.com/about_this_system.asp')
}else{
	window.open('http://ccc01.opinionlab.com/about20.asp?lang='+lang,'AboutOnlineOpinion','width=330,height=248,screenX='+((_rW-330)/2)+',screenY='+((_rH-248)/2)+',top='+((_rH-248)/2)+',left='+((_rW-330)/2));
}
}

function clearbox(obj){
	if(!notClicked){obj.value='';notClicked=true}
}

function clearbox2(obj){
	if(!notClicked2){obj.value='';notClicked2=true}
}

function clearother(thisobj){
if(thisobj.value=='other response')thisobj.value='';
}

var clicked = false;

function dropdown_other(l, n, v){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='other'){
			eval("document.CommentCard."+n+"_oth.style.visibility='visible';")
		}else{
			eval("document.CommentCard."+n+"_oth.style.visibility='hidden';")
		}
		return false;
	}
}

function dropdown_other_v2(l, n, v, deftxt){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='other'){
			eval("document.CommentCard."+n+"_oth.value='"+deftxt+"';");
			eval("document.CommentCard."+n+"_oth.style.visibility='visible';")
		}else{
			eval("document.CommentCard."+n+"_oth.value='';");
			eval("document.CommentCard."+n+"_oth.style.visibility='hidden';")
		}
		return false;
	}
}

function dropdown_shaw_v2a(l, n, v, deftxt){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='bad'||v.toLowerCase()=='not very good'){
			eval("document.CommentCard."+n+"_oth.value='"+deftxt+"';");
			eval("document.CommentCard."+n+"_oth.style.visibility='visible';")
		}else{
			eval("document.CommentCard."+n+"_oth.value='';");
			eval("document.CommentCard."+n+"_oth.style.visibility='hidden';")
		}
		return false;
	}
}

function dropdown_shaw_v2b(l, n, v, deftxt){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='could be better'||v.toLowerCase()=='dont like it'){
			eval("document.CommentCard."+n+"_oth.value='"+deftxt+"';");
			eval("document.CommentCard."+n+"_oth.style.visibility='visible';")
		}else{
			eval("document.CommentCard."+n+"_oth.value='';");
			eval("document.CommentCard."+n+"_oth.style.visibility='hidden';")
		}
		return false;
	}
}

function dropdown_other_display(l, n, v){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='other'){
			eval("document.CommentCard."+n+"_oth.style.display='inline';")
		}else{
			eval("document.CommentCard."+n+"_oth.style.display='none';")
		}
		return false;
	}
}

function dropdown_yes(l, n, v){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='yes'){
			eval("document.CommentCard."+n+"_oth.style.visibility='visible';")
		}else{
			eval("document.CommentCard."+n+"_oth.style.visibility='hidden';")
		}
		return false;
	}
}

function dropdown_yes_display(l, n, v, deftxt){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='yes'){
			eval("document.CommentCard."+n+"_oth.value='"+deftxt+"';");
			eval("document.CommentCard."+n+"_oth.style.display='inline';")
		}else{
			eval("document.CommentCard."+n+"_oth.value='';");
			eval("document.CommentCard."+n+"_oth.style.display='none';")
		}
		return false;
	}
}

function dropdown_no(l, n, v){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='no'){
			eval("document.CommentCard."+n+"_oth.style.visibility='visible';")
		}else{
			eval("document.CommentCard."+n+"_oth.style.visibility='hidden';")
		}
		return false;
	}
}

function dropdown_no_display(l, n, v, deftxt){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='no'){
			eval("document.CommentCard."+n+"_oth.value='"+deftxt+"';");
			eval("document.CommentCard."+n+"_oth.style.display='inline';")
		}else{
			eval("document.CommentCard."+n+"_oth.value='';");
			eval("document.CommentCard."+n+"_oth.style.display='none';")
		}
		return false;
	}
}

function dropdown_sometimes_display(l, n, v, deftxt){
	if(O_NS4){
		return false;
	}else{
		if(v.toLowerCase()=='no'){
			eval("document.CommentCard."+n+"_oth.value='"+deftxt+"';");
			eval("document.CommentCard."+n+"_oth.style.display='inline';")
		}else if(v.toLowerCase()=='somewhat'){
			eval("document.CommentCard."+n+"_oth.value='"+deftxt+"';");
			eval("document.CommentCard."+n+"_oth.style.display='inline';")
		}else{
			eval("document.CommentCard."+n+"_oth.value='';");
			eval("document.CommentCard."+n+"_oth.style.display='none';")
		}
		return false;
	}
}

function oth_reset(n){
	if(alreadyCleared[n]==1) {
		return;
	} else {
	    eval("document.CommentCard."+n+"_oth.value='';");
	    alreadyCleared[n] = 1;
	    return false;
	}
}

function setupClearList() {
	var i=1;
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question1.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question2.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question3.value]=0;
		i++
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question4.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question5.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question6.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question7.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question8.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question9.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question10.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question11.value]=0;
		i++;
	}
	if(i <= quesNum ) {
		alreadyCleared["answer_"+document.CommentCard.question12.value]=0;
		i++;
	}
}
//-->


