var gaJsHost=(("https:" == document.location.protocol)?"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));try {var pageTracker = _gat._getTracker("UA-1193146-4");pageTracker._trackPageview();
}catch(err){}messageObj = new DHTML_modalMessage();messageObj.setShadowOffset(5);function displayMessage(url,width,height){messageObj.setSource(url);messageObj.setCssClassMessageBox(false);messageObj.setSize(width,height);messageObj.setShadowDivVisible(true);messageObj.display();}function displayStaticMessage(messageContent,cssClass,width,height){messageObj.setHtmlContent(messageContent);messageObj.setSize(width, height);messageObj.setCssClassMessageBox(cssClass);messageObj.setSource(false);messageObj.setShadowDivVisible(false);messageObj.display();}function closeMessage(){messageObj.close();}function toggle_box_header(div_id,div_img_id){e=document.getElementById(div_id);if(e.style.display=='none'){e.style.display='inline';document.getElementById(div_img_id).src='<?php echo api_get_path(WEB_CODE_PATH);?>img/triangle_pointing_up.gif';}else{e.style.display = 'none';document.getElementById(div_img_id).src = '<?php echo api_get_path(WEB_CODE_PATH);?>img/triangle_pointing_down.gif';}return false;}function toggle_show_hide(div_id){e=document.getElementById(div_id);if(e.style.display =='none'){e.style.display = 'inline';}else{e.style.display='none';}return false;}function toggle_div_content(div_id,txt_div_id, show_content,hide_content){e=document.getElementById(div_id);txt_div=document.getElementById(txt_div_id);if(e.style.display=='none'){e.style.display='inline';txt_div.innerHTML=hide_content;}else{e.style.display='none';txt_div.innerHTML=show_content;}return false;}function validate_email(str){var at="@";var dot=".";var lat=str.indexOf(at);var lstr=str.length;var ldot=str.indexOf(dot);if(str.indexOf(at)==-1){document.getElementById('email_error').style.display='inline';return false;}if (str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){document.getElementById('email_error').style.display='inline';return false;}if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){document.getElementById('email_error').style.display = 'inline';return false;}if (str.indexOf(at,(lat+1))!=-1){document.getElementById('email_error').style.display = 'inline';return false;}if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){document.getElementById('email_error').style.display = 'inline';return false;}if (str.indexOf(dot,(lat+2))==-1){document.getElementById('email_error').style.display = 'inline';return false;}if (str.indexOf(" ")!=-1){document.getElementById('email_error').style.display = 'inline';return false;}return true;}function typeNewQuestion(){var quest_area =document.getElementById('question_area');if(quest_area.value=="Type your question here"){quest_area.value=" ";quest_area.style.color="#000000";quest_area.style.fontStyle="normal";}var disc_area =document.getElementById('disc_area');if(disc_area.value == "Type your question here"){disc_area.value=" ";disc_area.style.color="#000000";disc_area.style.fontStyle="normal";}}function checkCalendarDates(strStartDate, strEndDate,error_span, strToday){var d1;var d2;if(strStartDate==""){document.getElementById(error_span).innerHTML="";return false;}else{if(strStartDate != ""){d1=strStartDate.split(':');trim_d1=d1[0].split(' ');dt_1 = trim_d1[0].split('-');var startDate=new Date(dt_1[1]+'/'+dt_1[2]+'/'+dt_1[0]+' '+trim_d1[1]+':'+d1[1]);}if(strEndDate!=""){d2=strEndDate.split(':');trim_d2=d2[0].split(' ');dt_2=trim_d2[0].split('-');var endDate=new Date(dt_2[1]+'/'+dt_2[2]+'/'+dt_2[0]+' '+trim_d2[1]+':'+d2[1]);}t=strToday.split(':');trim_t=t[0].split(' ');t_1=trim_t[0].split('-');var today_date=new Date(t_1[1]+'/'+t_1[2]+'/'+t_1[0]+' '+trim_t[1]+':'+t[1]);if(startDate<today_date){document.getElementById(error_span).innerHTML="Invalid Start Date";return false;}else{if(endDate<=today_date){document.getElementById(error_span).innerHTML="Invalid End Date";return false;}else{if(startDate>=endDate&&strStartDate!=""&&strEndDate!=""){document.getElementById(error_span).innerHTML="End date cannot be lesser than Start date";return false;}else{document.getElementById(error_span).innerHTML="";return true;}}}}}function getHTTPObject(){var xmlhttp;if (!xmlhttp&&typeof XMLHttpRequest!= 'undefined'){try {xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}return xmlhttp;}function calculate_time_zone(){var rightNow = new Date();var jan1 = new Date(rightNow.getFullYear(),0,1,0,0,0,0);var june1=new Date(rightNow.getFullYear(),6,1,0,0,0,0);var temp = jan1.toGMTString();var jan2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1));temp=june1.toGMTString();var june2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1));var std_time_offset=(jan1-jan2)/(1000*60*60);var daylight_time_offset=(june1-june2)/(1000*60*60);var dst;if(std_time_offset==daylight_time_offset){dst="0";}else{var hemisphere=std_time_offset-daylight_time_offset;if(hemisphere>=0)std_time_offset=daylight_time_offset;dst="1";}var e=document.getElementsByName("timezoneval");if(e.length>0){e[0].value=convert(std_time_offset)+","+dst;}var XmlHttp = new getHTTPObject();if (XmlHttp){XmlHttp.open('GET', installCodePath+'inc/lib/timezone.inc.php?local='+convert(std_time_offset)+","+dst, true);XmlHttp.send(null);}}function convert(value){var hours=parseInt(value);value-=parseInt(value);value*=60;var mins=parseInt(value);value-=parseInt(value);value*=60;var secs=parseInt(value);var display_hours=hours;display_hours=(hours<10&&hours>0)?"+0"+hours:"+"+hours;display_hours=(hours==0)?"0"+hours:display_hours;display_hours=(hours<0&&hours>-10)?"-0"+Math.abs(hours):display_hours;mins=(mins<10)?"0"+mins:mins;return display_hours+":"+mins;}var HintClass="hintTextarea";var HintActiveClass="hintTextareaActive";String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');};function initHintTextboxes(){var inputs=document.getElementsByTagName('textarea');var inputtb=document.getElementsByTagName('input');for(i=0;i<inputs.length;i++){var input=inputs[i];if(input.type!="textarea")continue;if(input.className.indexOf(HintClass)!=-1){input.hintText=input.value;input.className=HintClass;
input.onfocus=onHintTextboxFocus;input.onblur=onHintTextboxBlur;}}for(i=0;i<inputtb.length;i++){var input=inputtb[i];if(input.type!="text")continue;if (input.className.indexOf(HintClass)!=-1){input.hintText=input.value;input.className=HintClass;input.onfocus=onHintTextboxFocus;input.onblur=onHintTextboxBlur;}}}function onHintTextboxFocus(){var input=this;if(input.value.trim()==input.hintText){input.value="";input.className=HintActiveClass;}}function onHintTextboxBlur(){var input=this;if(input.value.trim().length==0){input.value=input.hintText;input.className=HintClass;}else{input.className="";}}function showViewAnswers(q_uri){var btn=document.getElementById("view_answer_"+q_uri);btn.style.display="inline";}function hideViewAnswers(q_uri){var btn=document.getElementById("view_answer_"+q_uri);btn.style.display="none";}function toggle_multiple_show_hide(show_div_id_array,hide_div_id_array){show_arr_length=show_div_id_array.length;hide_arr_length=hide_div_id_array.length;for(i=0;i<show_arr_length;i++){e=document.getElementById(show_div_id_array[i]);e.style.display='inline';}for(i=0;i<hide_arr_length;i++){e=document.getElementById(hide_div_id_array[i]);e.style.display='none';}return false;}
