function open_login_popup(a,b,c,d){if(login_popup_destroyed){$("#login-modal-popup").dialog({minHeight:300,width:380,modal:true,resizable:false,draggable:false,autoOpen:false,close:function(){$(this).dialog("destroy");login_popup_destroyed=true}});$("form.jqtransform").jqTransform();login_popup_destroyed=false}if(a=="0"){$("#login-modal-popup").bind("dialogclose",function(){$(location).attr("href",web_path)})}if(c!=undefined){switch(d){case"already_logged_in":var e="You are already logged in to simplylearnt.com";break;case"account_expired":var e="Your account is expired please write to info@simplylearnt.com for clarifications.";break;case"account_inactive":var e="Your account is inactive please write to info@simplylearnt.com for clarifications.";break;case"user_password_incorrect":var e="The username or password you provided is wrong."}$("#login-modal-popup").dialog("option","title",'<img src="'+image_path+'message_warning.png" class="float_img"/>'+e)}else{if(b=="1")$("#login-modal-popup").dialog("option","title","You Need To Login To See This Page!");else $("#login-modal-popup").dialog("option","title","Please Enter Your Details")}$("#login-modal-popup").dialog("open");return false}function getHTTPObject(){var a;if(!a&&typeof XMLHttpRequest!="undefined"){try{a=new XMLHttpRequest}catch(b){a=false}}return a}function show_content(X,Y,Z){if(X!=selectedtab||first){eval(document.getElementById(selectedtab)).className="inactivetab";eval(document.getElementById(X)).className="activetab";first=0}var fix=selectedtab;selectedtab=X;if(Z&&fix!=X)eval(Z)}function tab_out(X){if(X!==selectedtab)eval(document.getElementById(X)).className="inactivetab"}function tab_over(X){if(X!=selectedtab)eval(document.getElementById(X)).className="mouseovertab"}function checkCalendarDates(a,b,c,d){var e;var f;if(a==""){document.getElementById(c).innerHTML="Select a date first";return false}else{if(a!=""){e=a.split(":");trim_d1=e[0].split(" ");dt_1=trim_d1[0].split("-");var g=new Date(dt_1[1]+"/"+dt_1[2]+"/"+dt_1[0]+" "+trim_d1[1]+":"+e[1])}if(b!=""){f=b.split(":");trim_d2=f[0].split(" ");dt_2=trim_d2[0].split("-");var h=new Date(dt_2[1]+"/"+dt_2[2]+"/"+dt_2[0]+" "+trim_d2[1]+":"+f[1])}t=d.split(":");trim_t=t[0].split(" ");t_1=trim_t[0].split("-");var i=new Date(t_1[1]+"/"+t_1[2]+"/"+t_1[0]+" "+trim_t[1]+":"+t[1]);if(g<i){document.getElementById(c).innerHTML="Invalid Start Date";return false}else{if(h<=i){document.getElementById(c).innerHTML="Invalid End Date";return false}else{if(g>=h&&a!=""&&b!=""){document.getElementById(c).innerHTML="End date cannot be lesser than Start date";return false}else{document.getElementById(c).innerHTML="";return true}}}}}function hideViewAnswers(a){var b=document.getElementById("view_answer_"+a);b.style.display="none"}function showViewAnswers(a){var b=document.getElementById("view_answer_"+a);b.style.display="inline"}function typeNewQuestion(){var a=document.getElementById("question_area");if(a.value=="Type your question here"){a.value=" ";a.style.color="#000000";a.style.fontStyle="normal"}var b=document.getElementById("disc_area");if(b.value=="Type your question here"){b.value=" ";b.style.color="#000000";b.style.fontStyle="normal"}}function validate_email(a){var b="@";var c=".";var d=a.indexOf(b);var e=a.length;var f=a.indexOf(c);if(a.indexOf(b)==-1){document.getElementById("email_error").style.display="inline";return false}if(a.indexOf(b)==-1||a.indexOf(b)==0||a.indexOf(b)==e){document.getElementById("email_error").style.display="inline";return false}if(a.indexOf(c)==-1||a.indexOf(c)==0||a.indexOf(c)==e){document.getElementById("email_error").style.display="inline";return false}if(a.indexOf(b,d+1)!=-1){document.getElementById("email_error").style.display="inline";return false}if(a.substring(d-1,d)==c||a.substring(d+1,d+2)==c){document.getElementById("email_error").style.display="inline";return false}if(a.indexOf(c,d+2)==-1){document.getElementById("email_error").style.display="inline";return false}if(a.indexOf(" ")!=-1){document.getElementById("email_error").style.display="inline";return false}return true}function toggle_multiple_show_hide(a,b,c,d){show_arr_length=a.length;hide_arr_length=b.length;show_text_arr_length=c.length;hide_text_arr_length=d.length;for(i=0;i<show_arr_length;i++){e=document.getElementById(a[i]);e.style.display="inline"}for(i=0;i<hide_arr_length;i++){e=document.getElementById(b[i]);e.style.display="none"}for(i=0;i<show_text_arr_length;i++){e=document.getElementById(c[i]);e.innerHTML="Show"}for(i=0;i<hide_text_arr_length;i++){e=document.getElementById(d[i]);e.innerHTML=""}return false}function toggle_div_content(a,b,c,d){e=document.getElementById(a);txt_div=document.getElementById(b);if(e.style.display=="none"){e.style.display="inline";txt_div.innerHTML=d}else{e.style.display="none";txt_div.innerHTML=c}return false}function toggle_show_hide(a){e=document.getElementById(a);if(e.style.display=="none"){e.style.display="inline"}else{e.style.display="none"}return false}function closeMessage(){messageObj.close()}function displayStaticMessage(a,b,c,d){messageObj.setHtmlContent(a);messageObj.setSize(c,d);messageObj.setCssClassMessageBox(b);messageObj.setSource(false);messageObj.setShadowDivVisible(false);messageObj.display()}function displayMessage(a,b,c){messageObj.setSource(a);messageObj.setCssClassMessageBox(false);messageObj.setSize(b,c);messageObj.setShadowDivVisible(true);messageObj.display()}DHTML_modalMessage=function(){var a;var b;var c;var d;var e;var f;var g;var h;var i;var j;var k;var l;var m;var n;this.url="";this.htmlOfModalMessage="";this.layoutCss="modal-message.css";this.height=200;this.width=400;this.cssClassOfMessageBox=false;this.shadowDivVisible=true;this.shadowOffset=5;this.MSIE=false;if(navigator.userAgent.indexOf("MSIE")>=0)this.MSIE=true};DHTML_modalMessage.prototype={setSource:function(a){this.url=a},setHtmlContent:function(a){this.htmlOfModalMessage=a},setSize:function(a,b){if(a)this.width=a;if(b)this.height=b},setCssClassMessageBox:function(a){this.cssClassOfMessageBox=a;if(this.divs_content){if(this.cssClassOfMessageBox)this.divs_content.className=this.cssClassOfMessageBox;else this.divs_content.className="modalDialog_contentDiv"}},setShadowOffset:function(a){this.shadowOffset=a},display:function(){if(!this.divs_transparentDiv){this.__createDivs()}this.divs_transparentDiv.style.display="block";this.divs_content.style.display="block";this.divs_shadow.style.display="block";if(this.MSIE)this.iframe.style.display="block";this.__resizeDivs();window.refToThisModalBoxObj=this;setTimeout("window.refToThisModalBoxObj.__resizeDivs()",150);this.__insertContent()},setShadowDivVisible:function(a){this.shadowDivVisible=a},close:function(){this.divs_transparentDiv.style.display="none";this.divs_content.style.display="none";this.divs_shadow.style.display="none";if(this.MSIE)this.iframe.style.display="none"},addEvent:function(a,b,c,d){if(!d)d="";if(a.attachEvent){a["e"+b+c+d]=c;a[b+c+d]=function(){a["e"+b+c+d](window.event)};a.attachEvent("on"+b,a[b+c+d])}else a.addEventListener(b,c,false)},__createDivs:function(){this.divs_transparentDiv=document.createElement("DIV");this.divs_transparentDiv.className="modalDialog_transparentDivs";this.divs_transparentDiv.style.left="0px";this.divs_transparentDiv.style.top="0px";document.body.appendChild(this.divs_transparentDiv);this.divs_content=document.createElement("DIV");this.divs_content.className="modalDialog_contentDiv";this.divs_content.id="DHTMLSuite_modalBox_contentDiv";this.divs_content.style.zIndex=1e5;if(this.MSIE){this.iframe=document.createElement('<IFRAME src="about:blank" frameborder=0>');this.iframe.style.zIndex=9e4;this.iframe.style.position="absolute";document.body.appendChild(this.iframe)}document.body.appendChild(this.divs_content);this.divs_shadow=document.createElement("DIV");this.divs_shadow.className="modalDialog_contentDiv_shadow";this.divs_shadow.style.zIndex=95e3;document.body.appendChild(this.divs_shadow);window.refToModMessage=this;this.addEvent(window,"scroll",function(a){window.refToModMessage.__repositionTransparentDiv()});this.addEvent(window,"resize",function(a){window.refToModMessage.__repositionTransparentDiv()})},__getBrowserSize:function(){var a=document.documentElement.clientWidth;var b=document.documentElement.clientHeight;var a,b;if(self.innerHeight){a=self.innerWidth;b=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else if(document.body){a=document.body.clientWidth;b=document.body.clientHeight}return[a,b]},__resizeDivs:function(){var a=Math.max(document.body.scrollTop,document.documentElement.scrollTop);if(this.cssClassOfMessageBox)this.divs_content.className=this.cssClassOfMessageBox;else this.divs_content.className="modalDialog_contentDiv";if(!this.divs_transparentDiv)return;var b=Math.max(document.body.scrollTop,document.documentElement.scrollTop);var c=Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);window.scrollTo(c,b);setTimeout("window.scrollTo("+c+","+b+");",10);this.__repositionTransparentDiv();var d=this.__getBrowserSize();var e=d[0];var f=d[1];this.divs_content.style.width=this.width+"px";this.divs_content.style.height=this.height+"px";var g=this.divs_content.offsetWidth;var h=this.divs_content.offsetHeight;this.divs_content.style.left=Math.ceil((e-g)/2)+"px";this.divs_content.style.top=Math.ceil((f-h)/2)+a+"px";if(this.MSIE){this.iframe.style.left=this.divs_content.style.left;this.iframe.style.top=this.divs_content.style.top;this.iframe.style.width=this.divs_content.style.width;this.iframe.style.height=this.divs_content.style.height}this.divs_shadow.style.left=this.divs_content.style.left.replace("px","")/1+this.shadowOffset+"px";this.divs_shadow.style.top=this.divs_content.style.top.replace("px","")/1+this.shadowOffset+"px";this.divs_shadow.style.height=h+"px";this.divs_shadow.style.width=g+"px";if(!this.shadowDivVisible)this.divs_shadow.style.display="none"},__repositionTransparentDiv:function(){this.divs_transparentDiv.style.top=Math.max(document.body.scrollTop,document.documentElement.scrollTop)+"px";this.divs_transparentDiv.style.left=Math.max(document.body.scrollLeft,document.documentElement.scrollLeft)+"px";var a=this.__getBrowserSize();var b=a[0];var c=a[1];this.divs_transparentDiv.style.width=b+"px";this.divs_transparentDiv.style.height=c+"px"},__insertContent:function(){if(this.url){ajax_loadContent("DHTMLSuite_modalBox_contentDiv",this.url)}else{this.divs_content.innerHTML=this.htmlOfModalMessage}}};messageObj=new DHTML_modalMessage;messageObj.setShadowOffset(5);var selectedtab="id0";var tD="document";var first=1;var login_popup_destroyed=false;var promo_popup_destroyed=false;$(function(){$("form.jqtransform").jqTransform();$("#login-modal-popup").dialog({minHeight:320,minWidth:400,modal:true,resizable:false,draggable:false,autoOpen:false,close:function(){$(this).dialog("destroy");login_popup_destroyed=true}});$("#promo-modal-popup").dialog({modal:true,width:400,resizable:false,draggable:false,autoOpen:true,close:function(){$(this).dialog("destroy");promo_popup_destroyed=true}})})
