function openWin(url,name,height,width,isScroll) {
    var options = "width=" + width + ", height=" + height+",scrollbars="+isScroll;
    var win = window.open(url, 'name', options);
    if (win.focus) { window.focus() 
    }
}


function setHeight(){
	if(document.getElementById('questionDivform')!=null){
		document.getElementById('rightBlock').style.height = document.getElementById('questionDivform').scrollHeight +127+ "px";
		document.getElementById('content').style.height = document.getElementById('questionDivform').scrollHeight +180+ "px";
	}
}

function setHeightTY(){
	var ua = navigator.userAgent.toLowerCase(); 
	if ( ua.indexOf( "msie" ) != -1 || ua.indexOf("safari") != -1 || ua.indexOf("chrome") != -1) {
			if(document.getElementById('leftBlock')!=null){
			document.getElementById('content').style.height = document.getElementById('leftBlock').scrollHeight +20+ "px";
		}
	}else if ( ua.indexOf("firefox") != -1 ) {
		if(document.getElementById('leftBlock')!=null){
		document.getElementById('content').style.height = document.getElementById('leftBlock').scrollHeight +310+ "px";
		}
	}

}

function doProcessing() {
  document.getElementById('rhSubmit').className = 'thide'; 	
  document.getElementById('processing').className = 'tshow';
  return true;
}



function resetSubmitBtn() {
  document.getElementById('button').className = 'tshow'; 	
  document.getElementById('processing').className = 'thide';
}

function checkAgreeToReceiveEmailOptIn(obj) {
  if(obj.checked){
  	document.getElementById('AgreeToReceiveEmail').value = "Yes";
  } else {
      	document.getElementById('AgreeToReceiveEmail').value = "No";
  }
}
