function CheckSelect(a,b){for(i=0;;i++){thisVar=a+"_"+i;obj=document.getElementById(thisVar);if(obj){if(obj.checked){return true}}else{break}}window.alert(b);return false}function CheckSearch(a,b){if(document.forms[a].elements.keywords.value==""){window.alert(b);document.forms[a].elements.keywords.focus();return false}else{return true}}function CheckAll(a){for(i=0;;i++){var b=document.getElementById(a+i);if(!b){break}b.checked=true}return}function UncheckAll(c){var a=document.getElementById("all_"+c);var b=true;for(i=0;;i++){var d=document.getElementById(c+i);if(!d){break}else{if(!d.checked){b=false;break}}}a.checked=b}function printThis(){document.styleSheets[0].disabled=true;document.styleSheets[1].disabled=false;window.print();setTimeout("printDone()",700)}function printDone(){document.styleSheets[1].disabled=true;document.styleSheets[0].disabled=false}function eCheckEMail(b){s=b.value;if(s.indexOf("@")==-1){return false}if(s.indexOf(".")==-1){return false}at=false;dot=false;for(var a=0;a<s.length;a++){ch=s.substring(a,a+1);if((ch>="A"&&ch<="Z")||(ch>="a"&&ch<="z")||(ch=="@")||(ch==".")||(ch=="_")||(ch=="-")||(ch>="0"&&ch<="9")){if(ch=="@"){if(at){return false}else{at=true}}if((ch==".")&&at){dot=true}}else{return false}}return dot}function CheckEMail(d,c,a){for(var b=0;b<c.length;b++){if(!eCheckEMail(d.elements[c[b]])){alert(a);d.elements[c[b]].focus();return false}}return true}function CheckRequiredFields(e,b,a){for(i=0;i<b.length;i++){if(e.elements[b[i]].type=="radio"){var c=e.elements[b[i]].name;var d=e.elements[c].length;for(n=0;n<d;n++){if(e.elements[c][n].checked){return true}}alert(a);e.elements[b[i]].focus();return false}else{if(e.elements[b[i]].value==""){alert(a);e.elements[b[i]].focus();return false}}}return true}function CheckForm(e,b,a,c,d){if(CheckRequiredFields(e,a,d)){if(CheckEMail(e,b,c)){return true}}return false}function changeLang(){var b=$("#chlang")[0];var a=b.options[b.selectedIndex].value;if(a==""){return}location.href=a}function CheckLogin(b,f,d,c){var e=document.forms[b].elements.cuser.value;var a=document.forms[b].elements.cpass.value;if(e==""&&a==""){window.alert(f);document.forms[b].elements.cuser.focus();return false}else{if(e==""){window.alert(d);document.forms[b].elements.cuser.focus();return false}else{if(a==""){window.alert(c);document.forms[b].elements.cpass.focus();return false}else{return true}}}}var currentDoc=-1;function switchDoc(a,b){for(i=0;i<maxDoc;i++){if($("#first_doc_bg"+i)[0]){$("#first_doc_bg"+i)[0].className="first_doc_slides"}$("#first_doc_sc"+i)[0].style.display="none"}$("#first_doc_sc"+a).fadeIn(300);if($("#first_doc_bg"+a)[0]){$("#first_doc_bg"+a)[0].className="slides_selected"}}function nextDoc(){if(currentDoc<maxDoc-1){currentDoc++}else{currentDoc=0}switchDoc(currentDoc,"block")}function preDoc(){if(currentDoc==0){currentDoc=maxDoc-1}else{currentDoc--}switchDoc(currentDoc,"block")}function playDocs(){nextDoc();if(maxDoc>1){autoTimerID=window.setTimeout("playDocs()",timerSpeed)}}function stopDocs(){if(maxDoc<=1){return}clearTimeout(autoTimerID)}function resumeDocs(){if(maxDoc<=1){return}clearTimeout(autoTimerID);autoTimerID=window.setTimeout("playDocs()",timerSpeed)}var isgetTab=true;function getMaxHeight(c,b,a,e){var d=0;for(i=0;i<e;i++){$("#"+c+i).css("display","block");if($("#"+c+i).outerHeight()>d){d=$("#"+c+i).outerHeight()}if(isgetTab){$("#"+c+i).css("display","none")}}if(d<=0){return}if(a){for(i=0;i<e;i++){$("#"+b+i).css("height",d)}}else{$("#"+b).css("height",d)}}function menuOver(a){$("#menu_"+a).addClass("head_menu_over")}function menuOut(a){$("#menu_"+a).removeClass("head_menu_over")}function setCurrentMenu(b,a){menuOver(b);$("#menu_"+b).attr("onmouseout","")}function switchTab(b,c,d,e){var a="tab_button"+b+"_";if(e==1){for(i=0;i<d;i++){$("."+a+i).removeClass(a+"all_over")}$("."+a+c).addClass(a+"all_over")}else{for(i=0;i<d;i++){$("."+a+i).removeClass(a+i+"_over")}$("."+a+c).addClass(a+c+"_over")}$(".tab_contents"+b).each(function(){$(this).css("display","none")});$("#tab_content"+b+"_"+c).fadeIn(300)}function showAtch(a){var b=$(a);if(b.css("visibility")!="visible"){b.css("visibility","visible");$(a+" object").css("visibility","visible")}}function hideAtch(a){var b=$(a);if(b.css("visibility")!="hidden"){b.css("visibility","hidden");$(a+" object").css("visibility","hidden")}}var currentNews=0;var intTickSpeed=5000;function ClicktNav(a){if(!arrNewsItems.length){return}$("#"+a).mouseup(function(){$(this).removeClass("tnav"+a)}).mousedown(function(){$(this).addClass("tnav"+a)});if(a=="next"){nextNews()}else{if(a=="back"){prevNews()}}}function nextNews(){setNews(currentNews)}function prevNews(){setNews(currentNews-2)}function initTicker(){if(!arrNewsItems.length){return}$("#ticker")[0].onmouseover=stopTicker;$("#ticker")[0].onmouseout=resumeTicker;$("#back")[0].onmouseover=stopTicker;$("#next")[0].onmouseover=stopTicker;$("#next")[0].onmouseout=resumeTicker;$("#back")[0].onmouseout=resumeTicker;playTicker()}function stopTicker(){clearTimeout(tickerTimerID)}function resumeTicker(){clearTimeout(tickerTimerID);tickerTimerID=self.setTimeout("playTicker()",intTickSpeed)}function playTicker(){setNews(currentNews);tickerTimerID=self.setTimeout("playTicker()",intTickSpeed)}function setNews(a){if(arrNewsItems.length<a+1){a=0}else{if(a<0){a=arrNewsItems.length-1}}strResults="";strResults+='<a href="'+arrNewsItems[a][1]+'" target="_top">';strResults+=arrNewsItems[a][0]+"</a>";$("#ticker_content").html(strResults);var c=$("#ticker_content").width();var b=$("#ticker_content").height();$("#ticker_typer").css({width:c,height:b}).animate({width:0},1000,function(){});currentNews=a+1}function changeCity(lang){$("#weather_loader").css("width",$("#weather_container").innerWidth()).css("height",$("#weather_container").innerHeight()-50).css("display","block");var sObj=$("#weather_city_obj")[0];var selVal=sObj.options[sObj.selectedIndex].value;$.ajax({type:"POST",url:"getweather.php",data:"isAjax=1&v1="+selVal+"&v2="+lang,success:function(myjson){var responseArr=eval(myjson);$("#weather_city").html(responseArr[0]);$("#weather_code").html(responseArr[1]);$("#weather_temp").html(responseArr[2]);$("#weather_image").attr("src",responseArr[3]);$("#weather_loader").css("display","none")}})}function TabequalHeight(a){tallest=0;a.each(function(){$(this).css("display","block");thisHeight=$(this).height();$(this).css("display","none");if(thisHeight>tallest){tallest=thisHeight}});a.height(tallest)}function equalHeight(a){tallest=0;a.each(function(){thisHeight=$(this).height();if(thisHeight>tallest){tallest=thisHeight}});a.height(tallest)};
