
var xmlHttptype;
var xmlHttptype1;
var xmlHttptype2;

function show_careerdata(str_careerquery, str_careerpage , str_careerID)
{ 
xmlHttptype=GetXmlHttpObject_career();
if (xmlHttptype==null)
 {
 alert ("Browser does not support HTTP Request");
 return
 }
var url_career=str_careerpage+str_careerquery;
xmlHttptype.onreadystatechange=stateChanged_career;	
xmlHttptype.open("GET",url_career,true);
xmlHttptype.send(null);	
}

function show_careerdata1(str_careerquery, str_careerpage , str_careerID)
{ 
xmlHttptype1=GetXmlHttpObject_career();
if (xmlHttptype1==null)
 {
 alert ("Browser does not support HTTP Request");
 return
 }
var url_career1=str_careerpage+str_careerquery;
xmlHttptype1.onreadystatechange=stateChanged_career1;	
xmlHttptype1.open("GET",url_career1,true);
xmlHttptype1.send(null);	
}


function onsel_careers_topic(sel_data){
 xmlHttptype=GetXmlHttpObject_career()
 if (xmlHttptype==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
 var url3="careers_display.php?sel_data="+sel_data
 xmlHttptype.onreadystatechange=ondisp_careers_data_content 
 xmlHttptype.open("GET",url3,true)
 xmlHttptype.send(null)
}     
 
function ondisp_careers_data_content(){
if (xmlHttptype.readyState==4 || xmlHttptype.readyState=="complete")
{
 document.getElementById("careers_datacontent").innerHTML=xmlHttptype.responseText 
}
} 

function onsel_jobs_topic(sel_data){
xmlHttptype=GetXmlHttpObject_career()
 if (xmlHttptype==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
 var url3="jobs_display.php?sel_data="+sel_data
 xmlHttptype.onreadystatechange=ondisp_jobss_data_content 
 xmlHttptype.open("GET",url3,true)
 xmlHttptype.send(null)
}     
 
function ondisp_jobss_data_content(){
if (xmlHttptype.readyState==4 || xmlHttptype.readyState=="complete")
{
 document.getElementById("careers_datacontent").innerHTML=xmlHttptype.responseText 
}
} 


function show_jobs_data_for_editing(abt_num){
window.open("jobs_now_on_display.php?val_num="+abt_num, '_blank','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=400');
} 



function stateChanged_career() 
{ 
if (xmlHttptype.readyState==4 || xmlHttptype.readyState=="complete")
 {
  document.getElementById("centerdata").innerHTML=xmlHttptype.responseText;
 } 
}

function stateChanged_career1() 
{ 
if (xmlHttptype1.readyState==4 || xmlHttptype1.readyState=="complete")
 {
  document.getElementById("bottomimg").innerHTML=xmlHttptype1.responseText;
 } 
}

function show_careers_data_for_edit(abt_num, abt_id){
window.open("careers_now_on_display.php?val_num="+abt_num+"&val_id="+abt_id, '_blank','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=400');
} 


function onactualupdate_careers(val_num, val_id){
var val_alldata = document.getElementById("careers_desc").value;
val_alldata = val_alldata.replace(/"'"/g, "&acute;")
val_alldata = val_alldata.replace(/"\""/g, "&quot;")
document.getElementById("careers_desc").value = val_alldata;
var doc_pass = document.getElementById("form1");
document.form1.action="careers_updatealready.php?val_num="+val_num+"&val_id="+val_id;
document.form1.submit();
}     

function onactualupdate_jobs(val_num){
var val_alldata = document.getElementById("jobs_desc").value;
val_alldata = val_alldata.replace(/"'"/g, "&acute;")
val_alldata = val_alldata.replace(/"\""/g, "&quot;")
document.getElementById("jobs_desc").value = val_alldata;

val_alldata = document.getElementById("txtjobtittle").value;
val_alldata = val_alldata.replace(/"'"/g, "&acute;")
val_alldata = val_alldata.replace(/"\""/g, "&quot;")
document.getElementById("txtjobtittle").value = val_alldata;

document.form1.action="jobs_updatealready.php?val_num="+val_num;
document.form1.submit();
}     

function onactualdelete_jobs(val_num){
document.form1.action="jobs_deletealredy.php?val_num="+val_num;
document.form1.submit();
}     
   
function on_add_new_careers(sel_data){
window.open("careers_now_on_addnew.php?sel_data="+sel_data, '_blank','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=400');
}    
function on_add_new_jobs(sel_data){
window.open("jobs_now_on_addnew.php?sel_data="+sel_data, '_blank','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=400');
}   
     
function onactualdelete_careers(val_num, val_id){
alert(val_num + " "+ val_id)	
var val_alldata = document.getElementById("careers_desc").value;
var doc_pass = document.getElementById("form1");
doc_pass.action="careers_deletealredy.php?val_num="+val_num+"&val_id="+val_id+"&val_alldata="+val_alldata;
doc_pass.submit();
}       

function on_insert_new_careers(sel_data){
var val_alldata = document.getElementById("career_desc").value;
val_alldata = val_alldata.replace(/"'"/g, "&acute;")
val_alldata = val_alldata.replace(/"\""/g, "&quot;")
document.getElementById("career_desc").value = val_alldata;
document.form1.action="careers_insert_new_data.php?sel_data="+sel_data;
document.form1.submit();
}

function on_insert_new_jobs(sel_data){
var val_alldata = document.getElementById("jobs_desc").value;
val_alldata = val_alldata.replace(/"'"/g, "&acute;")
val_alldata = val_alldata.replace(/"\""/g, "&quot;")
document.getElementById("jobs_desc").value = val_alldata;

val_alldata = document.getElementById("txtjobtittle").value;
val_alldata = val_alldata.replace(/"'"/g, "&acute;")
val_alldata = val_alldata.replace(/"\""/g, "&quot;")
document.getElementById("txtjobtittle").value = val_alldata;


document.form1.action="jobs_insert_new_data.php?sel_data="+sel_data;
document.form1.submit();
}

function GetXmlHttpObject_career()
{
var xmlcareer_type=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlcareer_type=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlcareer_type=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlcareer_type=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlcareer_type;
}


function allfunctions(str_careercaller){
xmlsetter(str_careercaller);
xmlsetter1(str_careercaller);

}


function xmlsetter(str_careerquery){
show_careerdata(str_careerquery, "careersampler.php?q=" , "centerdata");	
}

function xmlsetter1(str_careerquery){
show_careerdata1(str_careerquery, "careerpix1.php?q=" , "bottomimg");
}

function onalert(){
alert("sample")
}

function careershowcss(selid){
document.getElementById(selid).style.cursor = "pointer";
document.getElementById(selid).style.backgroundColor = "#ec7a22"
document.getElementById(selid).style.color = "#ffffff";
}

function careernoshowcss(selid){
document.getElementById(selid).style.cursor = "default";
document.getElementById(selid).style.backgroundColor = "#FFFFFF"
document.getElementById(selid).style.color = "#ec7a22";

}

function careershowcss2(selid){
document.getElementById(selid).style.cursor = "pointer";
document.getElementById(selid).style.backgroundColor = "#ec7a22"
document.getElementById(selid).style.color = "#ffffff";
}

function careernoshowcss2(selid){
document.getElementById(selid).style.cursor = "default";
document.getElementById(selid).style.backgroundColor = "#ffffff"
document.getElementById(selid).style.color = "#000000";
}

function app_id_pointer(str){
document.getElementById(str).style.cursor = "pointer";
}

function app_id_pointer2(str){
document.getElementById(str).style.cursor = "default";
}


function data_app_open(str){
window.open('online_app.php?jobid='+ str, '_blank','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=530, height=530')
}