////////////////////////////////////////////////
// Obfuscated by Javascript Obfuscator v.2.53 //
//        http://javascript-source.com        //
////////////////////////////////////////////////
function load_photocloud_aj(num_items,per_page,start_item)// by syu 2/2008
{start_item=start_item?start_item:0;xmlhttp=(window.XMLHttpRequest?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):null));if(xmlhttp){//xmlhttp.onreadystatechange=state_change_catlist
xmlhttp.open("POST",'photocloud_aj.php?',false)// added 12/2007 by syu to make url unique for ajax smarty
;xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.send('&num_items='+num_items+'&per_page='+per_page+'&start='+start_item)}document.getElementById("mainBodyDiv").innerHTML=xmlhttp.responseText;}function load_catlist_content_cattype_aj(num_items,per_page,start_item,category_id,cat_type,sortBy){/*if ( document.getElementById("select_cat_type").selectedIndex == 0 ) cat_type = '';	else if ( document.getElementById("select_cat_type").selectedIndex == 1 ) cat_type = 'newest';	else if ( document.getElementById("select_cat_type").selectedIndex == 2 ) cat_type = 'bestrated';*///alert(cat_type+','+ num_items+', '+per_page+', '+start_item+', '+category_id);
start_item=start_item?start_item:0;if(category_id>0)document.forms["form2"].elements["cat_id"].value=category_id;else if(document.forms["form2"].elements["cat_id"].value>0)category_id=document.forms["form2"].elements["cat_id"].value;xmlhttp=(window.XMLHttpRequest?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):null));if(xmlhttp){//xmlhttp.onreadystatechange=state_change_catlist
xmlhttp.open("POST",'category_listing_aj.php?'+category_id+sortBy,false)// added 12/2007 by syu to make url unique for ajax smarty
;xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.send('cat_type='+cat_type+'&num_items='+num_items+'&per_page='+per_page+'&start='+start_item+'&category_id='+category_id+'&sortBy='+(sortBy?sortBy:''))}document.getElementById("mainBodyDiv").innerHTML=xmlhttp.responseText;}function load_catlist_content_cattype_aj_alphabet(category_id,firstname,sortBy)// searching by alphabet by syu 1/2008
{xmlhttp=(window.XMLHttpRequest?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):null));if(xmlhttp){//xmlhttp.onreadystatechange=state_change_catlist
xmlhttp.open("POST",'category_listing_aj.php?'+category_id+firstname,false)// added 12/2007 by syu to make url unique for ajax smarty
;xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.send('category_id='+category_id+'&firstname='+firstname+'&sortBy=alphabet')}document.getElementById("mainBodyDiv").innerHTML=xmlhttp.responseText;// endAjaxIndicator();
}function load_catlist_content_author_aj(num_items,per_page,start_item,firstname,cat_type){/*if ( document.getElementById("select_cat_type").selectedIndex == 0 ) cat_type = '';	else if ( document.getElementById("select_cat_type").selectedIndex == 1 ) cat_type = 'newest';	else if ( document.getElementById("select_cat_type").selectedIndex == 2 ) cat_type = 'bestrated';*///alert(cat_type+','+ num_items+', '+per_page+', '+start_item+', '+category_id);
start_item=start_item?start_item:0;xmlhttp=(window.XMLHttpRequest?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):null));if(xmlhttp){//xmlhttp.onreadystatechange=state_change_catlist
xmlhttp.open("POST",'author_listing_aj.php?'+firstname,false)// added 12/2007 by syu to make url unique for ajax smarty
;xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.send('cat_type='+cat_type+'&num_items='+num_items+'&per_page='+per_page+'&start='+start_item+'&firstname='+firstname);}document.getElementById("mainBodyDiv").innerHTML=xmlhttp.responseText;}function show_full_image(image_id){//alert(num_items+', '+per_page+', '+start_item+', '+category_id);
xmlhttp=(window.XMLHttpRequest?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):null));if(xmlhttp){xmlhttp.onreadystatechange=state_change_full_image;xmlhttp.open("POST",'show_full_image_aj.php',false);xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.send('image_id='+image_id)}document.getElementById(aid_val).className="inactive1";document.getElementById("last_clicked").value=category_id;document.getElementById("mainBodyDiv").innerHTML=xmlhttp.responseText;}function state_change_full_image(){if(xmlhttp.readyState==4){}}function load_catlist_content_aj(num_items,per_page,start_item,category_id,sortBy){//alert(num_items+', '+per_page+', '+start_item+', '+category_id);
if(category_id>0)document.forms["form2"].elements["cat_id"].value=category_id;else if(document.forms["form2"].elements["cat_id"].value>0)category_id=document.forms["form2"].elements["cat_id"].value;xmlhttp=(window.XMLHttpRequest?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):null));if(xmlhttp){xmlhttp.onreadystatechange=state_change_catlist;xmlhttp.open("POST",'category_listing_aj.php',false);xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.send('num_items='+num_items+'&per_page='+per_page+'&start='+start_item+'&category_id='+category_id+'&sortBy='+(sortBy?sortBy:''));}aid_val="aid_"+category_id;if(document.getElementById("last_clicked").value!=''){last_aid="aid_"+document.getElementById("last_clicked").value;document.getElementById(last_aid).className="active1";}document.getElementById(aid_val).className="inactive1";document.getElementById("last_clicked").value=category_id;document.getElementById("mainBodyDiv").innerHTML=xmlhttp.responseText;// endAjaxIndicator();
}function state_change_catlist(){if(xmlhttp.readyState==4){}}function category_reset(){document.forms["form2"].elements["cat_id"].value='';}function load_ajax_content_aj(show_type,num_items,per_page,start_item,category_id,user_id,sortBy){//alert(show_type+', '+num_items+', '+per_page+', '+start_item+', '+category_id+', '+user_id);
if(category_id>0)document.forms["form2"].elements["cat_id"].value=category_id;else if(document.forms["form2"].elements["cat_id"].value>0)category_id=document.forms["form2"].elements["cat_id"].value;if(show_type!='')document.forms["form2"].elements["show_type"].value=show_type;else if(document.forms["form2"].elements["show_type"].value!='')show_type=document.forms["form2"].elements["show_type"].value;if(show_type=='newest')tag_id='tag_newest';else if(show_type=='best_rated')tag_id='tag_bestr';else if(show_type=='my_favourite')tag_id='tag_myf';if(show_type=='my_favourite'&&!user_id){window.location.href='login.php';document.forms["form2"].elements["cat_id"].value='';document.forms["form2"].elements["show_type"].value='';}xmlhttp=(window.XMLHttpRequest?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):null));if(xmlhttp&&show_type!=''){xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){}};xmlhttp.open("POST",'index_aj.php?page='+start_item,false);xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.send('show_type='+show_type+'&user_id='+user_id+'&num_items='+num_items+'&per_page='+per_page+'&start_item='+start_item+'&category_id='+category_id+'&sortBy='+(sortBy?sortBy:''))/* document.getElementById('tag_newest').parentNode.style.backgroundColor = "#ffffff";		document.getElementById('tag_bestr').parentNode.style.backgroundColor = "#ffffff";		document.getElementById('tag_myf').parentNode.style.backgroundColor = "#ffffff";				document.getElementById('tag_newest').style.borderBottomColor = "#666666";		document.getElementById('tag_bestr').style.borderBottomColor = "#666666";		document.getElementById('tag_myf').style.borderBottomColor = "#666666";				document.getElementById(tag_id).parentNode.style.backgroundColor = "#88D5D5";		document.getElementById(tag_id).style.borderBottomColor = "#88D5D5";		*/}document.getElementById("mainBodyDiv").innerHTML=xmlhttp.responseText;// endAjaxIndicator();
}function state_change(){if(xmlhttp.readyState==4){}}function show_ad_image1(){document.getElementById('ad_imagediv1').style.visibility='visible';document.getElementById('ad_imagediv1').style.display='block';document.all.img1.src=document.all.image1.value;}function show_ad_image2(){document.getElementById('ad_imagediv2').style.visibility='visible';document.getElementById('ad_imagediv2').style.display='block';document.all.img2.src=document.all.image2.value;}function show_ad_image3(){document.getElementById('ad_imagediv3').style.visibility='visible';document.getElementById('ad_imagediv3').style.display='block';document.all.img3.src=document.all.image3.value;}function show_ad_image4(){document.getElementById('ad_imagediv4').style.visibility='visible';document.getElementById('ad_imagediv4').style.display='block';document.all.img4.src=document.all.image4.value;}function show_ad_image5(){document.getElementById('ad_imagediv5').style.visibility='visible';document.getElementById('ad_imagediv5').style.display='block';document.all.img5.src=document.all.image5.value;}function show_ad_image6(){document.getElementById('ad_imagediv6').style.visibility='visible';document.getElementById('ad_imagediv6').style.display='block';document.all.img6.src=document.all.image6.value;}function show_ad_image7(){document.getElementById('ad_imagediv7').style.visibility='visible';document.getElementById('ad_imagediv7').style.display='block';document.all.img7.src=document.all.image7.value;}function show_ad_image8(){document.getElementById('ad_imagediv8').style.visibility='visible';document.getElementById('ad_imagediv8').style.display='block';document.all.img8.src=document.all.image8.value;}function calculate_monthly_income(group){var total_income_id='total_'+group;var total_income=document.getElementById(total_income_id);var income_id;var income;var cal=parseFloat("0.00");total_income.value="0.00";for(var i=1;;i++){income_id=group+i;income=document.getElementById(income_id);if(!income)break;if(income.value=="")income.value="0.00";cal=parseFloat(total_income.value)+parseFloat(income.value);total_income.value=cal;}var total_monthly_income=document.getElementById("total_monthly_income");var total_housing=document.getElementById("total_housing");var total_transportation=document.getElementById("total_transportation");var total_debt=document.getElementById("total_debt");var total_food=document.getElementById("total_food");var total_clothing=document.getElementById("total_clothing");var total_miscellaneous=document.getElementById("total_miscellaneous");var total_saving=document.getElementById("total_saving");var total_expenses=document.getElementById("total_expenses");total_expenses.value=parseFloat(total_housing.value)+parseFloat(total_transportation.value)+parseFloat(total_debt.value)+parseFloat(total_food.value)+parseFloat(total_clothing.value)+parseFloat(total_miscellaneous.value);total_saving.value=parseFloat(total_monthly_income.value)-parseFloat(total_expenses.value);}function chcek_numeric(e,th){var isIE=(window.event)?1:0;if(isIE){if(e.keyCode<46||e.keyCode>57){e.returnValue=false;}}else{if(e.which<46||e.which>57){if(e.which!=8)e.preventDefault();}}}function enable_field(ths,en_field_id){en_field=document.getElementById(en_field_id);if(ths.checked==true)en_field.disabled=false;}function clear_field(ths,en_field_id){en_field=document.getElementById(en_field_id);if(ths.checked==true){en_field.disabled=true;en_field.value="";}}function print_preview(str){var arg='resizable=no, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=850,height=950,top=20,left=250';window.open(str,"_blank",arg);}function check_agree(){if(document.form1.i_agree.checked==false){alert('You have to agree the terms.');return false;}if(document.form1.i_agree_spouse&&document.form1.i_agree_spouse.checked==false&&document.form1.spouse_name.value!=""){alert('Spouse or co-applicant have to agree the terms if he/she wants to sign.');return false;}return true;}function confirm_delete(){var val;val=confirm("Do you want to delete?");return val;}function set_focus_login(){document.getElementById("name").setfocus=true;}function email_check(){var emailchar=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(emailchar.test(document.getElementById("email").value)){return true}else{alert("Please, enter a valid email address.");}};function show_logo(){document.getElementById('logodiv').style.visibility='visible';document.getElementById('logodiv').style.display='block';document.all.logo.src=document.all.userfile.value;}function show_popup(str){var arg='resizable=yes, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=780,top=20,left=0';window.open(str,"_blank",arg);}function startAjaxIndicator(dv,nt,pp,st,ci,ui,sr){//	document.getElementById('disabledImageZone').style.display = 'block';
//	document.getElementById('loaderContainer').style.display = 'block';
document.getElementById('loaderContainer').innerHTML="<img src='./img/loading.gif' align='absmiddle'>";// by syu
setTimeout("category_reset();load_ajax_content_aj('"+dv+"', '"+nt+"', '"+pp+"', '"+st+"', '"+ci+"', '"+ui+"', '"+sr+"');",30);}function endAjaxIndicator(){//	document.getElementById('disabledImageZone').style.display = 'none';
document.getElementById('loaderContainer').style.display='none';}function startAjaxIndicator2(nt,pp,st,ci,dv,sr){//	document.getElementById('disabledImageZone').style.display = 'block';
//	document.getElementById('loaderContainer').style.display = 'block';
document.getElementById('loaderContainer').innerHTML="<img src='./img/loading.gif' align='absmiddle'>";// by syu
setTimeout("load_catlist_content_cattype_aj('"+nt+"', '"+pp+"', '"+st+"', '"+ci+"', '"+dv+"', '"+sr+"');",10);}function startAjaxIndicator_author(nt,pp,st,ci,dv,sr){//	document.getElementById('disabledImageZone').style.display = 'block';
//	document.getElementById('loaderContainer').style.display = 'block';
document.getElementById('loaderContainer').innerHTML="<img src='./img/loading.gif' align='absmiddle'>";// by syu
setTimeout("load_catlist_content_author_aj('"+nt+"', '"+pp+"', '"+st+"', '"+ci+"', '"+dv+"', '"+sr+"');",10);}function startAjaxIndicator3(nt,pp,st,ci){//	document.getElementById('disabledImageZone').style.display = 'block';
//	document.getElementById('loaderContainer').style.display = 'block';
document.getElementById('loaderContainer').innerHTML="<img src='./img/loading.gif' align='absmiddle'>";// by syu
setTimeout("load_catlist_content_aj('"+nt+"', '"+pp+"', '"+st+"', '"+ci+"');",30);}function startAjaxIndicatorAlphabet(category,firstname)// for searching by alphabet by syu 1/2008
{document.getElementById('loaderContainer').innerHTML="<img src='./img/loading.gif' align='absmiddle'>";// by syu
setTimeout("load_catlist_content_cattype_aj_alphabet('"+category+"', '"+firstname+"');",30);}function startAjaxPhotoCloud(nt,pp,st)// for searching by alphabet by syu 1/2008
{document.getElementById('loaderContainer').innerHTML="<img src='./img/loading.gif' align='absmiddle'>";// by syu
setTimeout("load_photocloud_aj('"+nt+"', '"+pp+"', '"+st+"');",2);}
