"); } if(element_id == 'firstname' ) { jQuery_1("#preview_"+element_id).addClass('preview_error_left').show(); } else if(element_id == 'lastname' || element_id=='city_id' ) { jQuery_1("#preview_"+element_id).addClass('preview_error_right').show(); } else if(element_id == 'industry_signup') { jQuery_1("#preview_"+element_id).css('float','none').show(); } else { jQuery_1("#preview_"+element_id).show(); } } function getCookieWtihName(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } function setCookiewithName(name,value,days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + (value || "") + expires + "; path=/"; } function set_frequence(title){ var val = getCookieWtihName(title); if(parseInt(val) > 3){ return 1; } if(parseInt(val) > 0){ val = parseInt(val)+ 1; setCookiewithName(title , val , 1); } else { val = parseInt(1); setCookiewithName(title , val , 1); } } jQuery_1(function(){ jQuery_1('#signupmodal #close_btn').click(function(){ setTimeout(function(){ set_frequence("_sbcnt",1); var counter = getCookieWtihName('_sbcnt'); if(counter < 4){ jQuery_1("#tk_sidebar_inquiry #sidebar-link img").click(); } }, 1000); }); jQuery_1('#tk_sidebar_inquiry #sidebar-link').click(function(){ memtype = (getCook("c_memtype") != '' && (parseInt(getCook("c_memtype")) > 0 )) ? getCook("c_memtype") : parseInt(0) ;	if(parseInt(memtype) <= 0) { var postion = jQuery_1(this).css("left"); if(postion == "320px"){ setTimeout(function(){ set_frequence("_batcnt"); var counter = getCookieWtihName('_batcnt'); if(counter < 4){ jQuery_1("#book_call_contact_form #tk_contact-opener").click();	} }, 1000); } } }); });