var block_m_obj="alljobsredtab";

function reload_captcha()
{
a=this.document.images['img_captcha'].src;
this.document.images['img_captcha'].src="images/spacer.gif";
this.document.images['img_captcha'].src=a;
}
function mover(t)
{
if(t!=block_m_obj)
{
	this.document.images[t].src="images/"+t+"_over.png";
}
}
function mout(t)
{
if(t!=block_m_obj)
{
this.document.images[t].src="images/"+t+".png";
}
}
function mclick(t)
{
block_m_obj=t;
}

function job_post_chk()
{
if(this.document.frm.company_name.value=="")
{
alert("Please Fill Company Name");
return false;
}


if(this.document.frm.company_website.value=="")
{
alert("Please Fill Company Website Address");
return false;
}
if(this.document.frm.jt_id.value<0)
{
alert("Please Select in Job Type");
return false;
}
if(this.document.frm.jl_id.value==0)
{
alert("Please select Job Level");
return false;
}
if(this.document.frm.cat_id.value<0)
{
alert("Please Select in Category");
return false;
}
if(this.document.frm.job_position_title.value=="")
{
alert("Please Fill in a Position Title");
return false;
}
if(this.document.frm.description.value=="")
{
alert("Please Fill in a Job Description");
return false;
}
if(this.document.frm.howapply.value=="")
{
alert("Please Fill in how to Apply in Job Section");
return false;
}
if(!(this.document.frm.condition.checked))
{
alert("You must accept the agreement in order to post your position ");
return false;
}

this.document.frm.submit();
//js_xml_form_submit("job.php",js_form_submit(this.document.frm));
//return false;
}


function job_post_reload()
{
this.document.frm.act.value="job_show";
js_xml_form_submit("job.php",js_form_submit(this.document.frm));
return false;
}
 
function job_save()
{
this.document.frm.act.value="job_save_continue";
//js_xml_form_submit("job.php",js_form_submit(this.document.frm));
return true;
}
function home_post_reload_listing()
{
this.document.frm_top_nav.act.value="home_show";
this.document.frm_top_nav.submit();
//js_xml_form_submit("index.php",js_form_submit(this.document.frm_top_nav));
}
function home_post_reload()
{
this.document.frm_top_nav.act.value="home_show";
this.document.frm_top_nav.submit();
//js_xml_form_submit("index.php",js_form_submit(this.document.frm_top_nav));
//return false;
}
function job_post_force()
{
this.document.frm.act.value="job_post_force";
js_xml_form_submit("job.php",js_form_submit(this.document.frm));
//return false;
}
   
function job_edit()
{
this.document.frm.act.value="edit_show";
this.document.frm.submit();
//js_xml_form_submit("job.php",js_form_submit(this.document.frm));
//return false;
}
function nb(a)
{
this.document.frm.st_pos.value=a;
this.document.frm.act.value="home_show";
this.document.frm.submit();
//js_xml_form_submit("index.php",js_form_submit(this.document.frm));
//return false;
}
   
function form_mail_send()
{
t_frm=this.document.mailtofriend;
if(t_frm.captcha.value=="")
{
alert("Please enter Confirmation Code to proceed");
return false;
}
this.document.mailtofriend.act.value="mail_send";
js_xml_form_submit("index.php",js_form_submit(this.document.mailtofriend));
return false;
}



function contact_chk()
{
if(this.document.frm.name.value=="")
{
alert("Please Fill in Name");
return false;
}
if(this.document.frm.title.value=="")
{
alert("Please Fill in title");
return false;
}

if(this.document.frm.company.value=="")
{
alert("Please Fill  in company");
return false;
}
if(this.document.frm.email.value=="")
{
alert("Please Fill in Email");
return false;
}
//js_xml_form_submit("autho.php",js_form_submit(this.document.frm));
return true;
}

 function countWords(field) {

    var desc = document.getElementById(field);
    var descContent = desc.value;

    // start the counting!
    var count = 0;
    var a = descContent.replace(/\s/g, ' ');
    a = a.split(' ');
    for (var z=0; z<a.length; z++) {
        if (a[z].length > 0) {
            count++;
        }
    }

this.document.frm.count.value=count;
//alert(count);
    //return count;
}

function countWord(field) {

    var desc = document.getElementById(field);
    var descContent = desc.value;

    // start the counting!
    var count = 0;
    var a = descContent.replace(/\s/g, ' ');
    a = a.split(' ');
    for (var z=0; z<a.length; z++) {
        if (a[z].length > 0) {
            count++;
        }
    }

this.document.frm.counts.value=count;
//alert(count);
    //return count;
}