/***********************************************
* Dynamic Ajax Content- � Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
var bustcacheparameter=""
var page_request = false
var cmds=undefined;
var dnj = undefined;
function reload_hash(){
	//check location
	var url = window.location;
	url += "";
	var ind = url.indexOf("#");
	if(ind<0){
		window.location.reload();
	}
	var bstring = url.substr(ind);
	//make sure # i not a named a
	if(bstring == '#null' || bstring == 'null') {
		return;
	}
	
	if(bstring.indexOf("d=")<0||bstring.indexOf("u=")<0){
		window.location.reload();
	}
	var tdiv = unescape(bstring.substr(bstring.indexOf("d=")+2,bstring.indexOf("u=")-3	));
	var url = unescape(bstring.substr(bstring.indexOf("u=")+2));
	do_ajaxpage(url, tdiv,cmds,dnj);
	
}

function do_ajaxpage(url, containerid, commands, do_not_jump){
	// create ajax request
	
	new Ajax.Updater(containerid,url, {
	  evalScripts: true,
	  onSuccess: after_comp(containerid, commands, do_not_jump)
	  
	});
}
function after_comp(containerid, commands, do_not_jump){

	if(commands!=undefined){
		try{
			eval(commands);
		}catch (e){}
	}
	
	if(do_not_jump!=true){
		containerid="top_page_scroll_div";
			
		if (Effect) { // use scriptaculous 
			//Effect.ScrollTo(containerid, {offset:-60, duration:0.25});
							
			Effect.ScrollTo(containerid, {offset:-60, duration:0.25});
		} else {
			//window.scrollTo(getElementLeft(containerid),getElementTop(containerid)-60);
			window.scrollTo(getElementLeft(containerid),getElementTop(containerid)-60);
		}
	}
	
}
/*
function do_ajaxpage(url, containerid, commands, do_not_jump){
	if(commands==undefined){
		commands=cmds;
	}
	if(do_not_jump==undefined){
		do_not_jump = dnj;
	}
	if (window.XMLHttpRequest) // if Mozilla, Safari etc
		page_request = new XMLHttpRequest()
	else if (window.ActiveXObject){ // if IE
		try {
			page_request = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try{
				page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else{
		return false
	}
	page_request.onreadystatechange=function(){
		loadpage(page_request, containerid, commands, do_not_jump)
	}
	
if (bustcachevar) //if bust caching of external page
		bustcacheparameter=(url.indexOf("?")!=-1)? "&bc="+new Date().getTime() : "?bc="+new Date().getTime()
	var divt = (url.indexOf("?")!=-1)? "&"+"ajaxpagedivid=" +containerid:"?"+"ajaxpagedivid="+containerid;

	page_request.open('GET', url+bustcacheparameter+divt, true)
	page_request.send(null)
}*/

function ajaxpage(url, containerid, commands, do_not_jump){
	cmds = commands;
	dnj = do_not_jump;
	if(containerid == 'ajax-smallframe' || containerid == 'ajax-infobar') {
		do_ajaxpage(url, containerid);
	}else{
		hashListener.setHash("d="+escape(containerid)+"u="+escape(url));
	}
}

function ajaxpageByObj(url, obj){
	var page_request = false
	if (window.XMLHttpRequest) // if Mozilla, Safari etc
		page_request = new XMLHttpRequest()
	else if (window.ActiveXObject){ // if IE
		try {
			page_request = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try{
				page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else{
		return false
	}
	page_request.onreadystatechange=function(){
		loadpageByObj(page_request, obj)
	}
	if (bustcachevar) //if bust caching of external page
	bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
	page_request.open('GET', url+bustcacheparameter, true)
	page_request.send(null)
}

function loadpage(page_request, containerid, commands, do_not_jump){	
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
		if(do_not_jump!=true){
			if (Effect) { // use scriptaculous 
				//Effect.ScrollTo(containerid, {offset:-60, duration:0.25});
				Effect.ScrollTo('ajax-infobar', {offset:-60, duration:0.25});
			} else {
				//window.scrollTo(getElementLeft(containerid),getElementTop(containerid)-60);
				window.scrollTo(getElementLeft(containerid),getElementTop('ajax-infobar')-60);
			}

		}
		//add item in href
		document.getElementById(containerid).innerHTML=page_request.responseText
		if(commands!=undefined){
			var cmd = commands.split(';');
			for ( var i in cmd ){
				if(cmd[i].trim!=''){
					try{
						eval(cmd[i]);
					}catch (e){
						//do nothing
					}
				}
			}
		}
		checkforwysiwyg();
	}
}

function ajax_command(url, command){
		new Ajax.Request(url, {
		method:'post',
		evalScripts: true,
		onComplete: function(transport){
		  	try{
				eval(command);
			}catch(e){}
	  	}
	});
	
	
	
	/*
	
	
	makeGETRequest(url);
	http_request.onreadystatechange = function() {
		if(http_request.readyState == 4 && http_request.status == 200) {
			//addRow(divid,msgDivId);
			try{
				eval(command);
			}catch(e){}
			checkforwysiwyg();
		}
	}*/
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//	Added by: Peter B; 10 Nov 2008
//	Append content to div
//	
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function appendpage(url,divid, commands){
	makeGETRequest(url);
	http_request.onreadystatechange = function() {
		if(http_request.readyState == 4 && http_request.status == 200) {
			//addRow(divid,msgDivId);
			try{
				eval(commands);
			}catch(e){}
			checkforwysiwyg;
		}
	}	
} //..end appendpage 

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//	Added by: Peter B; 10 Nov 2008
//	add row of textboxes append content to div
//	
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var msgDiv=5;
function addRow(divid)
{
	
	var innerDiv = document.createElement("div");
	innerDiv.id = "cont";
	
//add the boxes
	addTextBox(innerDiv,"email[]","Email",msgDiv,true);
	addTextBox(innerDiv,"name[]","Name",msgDiv,true);
	addTextBox(innerDiv,"company[]","Company");
	
// add the message div
	var cell = document.createElement("div");
		cell.id = "new_row_cnt";
	var mDiv = document.createElement("div");
		mDiv.id = msgDiv;
		mDiv.style.color="#FF0000";
				
	cell.appendChild(mDiv);
	innerDiv.appendChild(cell);
	
	var myDiv = document.getElementById(divid);	
	myDiv.appendChild(innerDiv);
	msgDiv++;
	
	
	
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//	Added by: Peter B; 10 Nov 2008
//	add textbox on the fly append content to div
//	
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function addTextBox(divid,identifier,descriptor,msgDiv,addevent)
{
	  var type = "text";
	  
   // cell container to hold each field and its label
	  var cell = document.createElement("div");
		  cell.id = "new_row_cnt";
	  

      var myDiv = divid;//document.getElementById(divid);
      var newText = document.createElement("INPUT");
      var newLabel = document.createElement("LABEL");

   // These are here just to look better for the example
      var br1 = document.createElement("BR");

      newText.type = type;
      newText.name = identifier;
      
      newLabel.innerHTML = descriptor;
  // add event to 
      if(addevent != undefined)
      {
      	if(identifier.indexOf('email')!=-1)
      	{
      		newText.id = 'email_'+msgDiv;
      	  	var event = "checkEmail(this.value,'"+ msgDiv +"')";
      	}
      	else
      	{
      		newText.id = 'name_'+msgDiv;
      		var event = "isTextEmpty(this.value,'"+ msgDiv +"')";
      	}
      	 newText.setAttribute('onBlur',event);
      	
      }

      cell.appendChild(newLabel);
      cell.appendChild(br1);
      cell.appendChild(newText);
      
      myDiv.appendChild(cell);
	
}

function loadpageByObj(page_request, obj){
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
		obj.innerHTML=page_request.responseText
}

function loadobjs(){
	if (!document.getElementById)
		return false;
	
	for (i=0; i<arguments.length; i++){
		var file=arguments[i]
		var fileref=""
		if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
			if (file.indexOf(".js")!=-1){ //If object is a js file
				fileref=document.createElement('script')
				fileref.setAttribute("type","text/javascript");
				fileref.setAttribute("src", file);
			}
			else if (file.indexOf(".css")!=-1){ //If object is a css file
				fileref=document.createElement("link")
				fileref.setAttribute("rel", "stylesheet");
				fileref.setAttribute("type", "text/css");
				fileref.setAttribute("href", file);
			}
		}
		if (fileref!=""){
			document.getElementsByTagName("head").item(0).appendChild(fileref)
			loadedobjects+=file+" " //Remember this object as being already added to page
		}
	}
	return true;
}

function ajaxinfo(url, commands){
	makeGETRequest(url);
	http_request.onreadystatechange = function() {
		if(http_request.readyState == 4 && http_request.status == 200) {
			addinfo(http_request.responseText);
		}
	}
}

function addinfo(text){
	element = $('ajax-infobar');
	element.innerHTML = text;
	new Effect.Appear(element.id, {duration:.3, from: 0.0, to: 1.0, afterFinish: function() { element.style.opacity=1;window.setTimeout('Effect.Fade(\'ajax-infobar\')',5000)}}); 
	Effect.afterFinish = "";
 }

 function slideDiv(id){
 	element = $(id);
 	new Effect.toggle(element.id, 'slide', {duration:1, toggle:true});
 	
 }
 
 function toggleImage(img){ // to invert the arrow on collapsing slideDiv
 	img1 = "images/ico-arrow.png";
 	img2 = "images/ico-arrow-down.png";
	if (document[img].src.indexOf(img1)!= -1){	
	 document[img].src = img2;
	}
	else{
		document[img].src = img1;
	}
 }

function ajaxpopup(url, commands){
	ajaxpage(url, 'ajax-smallframe', commands);
	positionDiv('ajax-smallframe'); 
	window.onresize="posDiv"
	window.onkeypress=checkesc;	
}

function checkesc(e){
	
	if(window.event) // IE
  	{
  		e=window.event;
  	}
  	if(e.charCode){
  		var keynum = e.charCode;
  	}else{
  		var keynum = e.keyCode;
  	}
  	if(keynum==27){
  		closeajaxpopup();
  	}
}

function posDiv() {
	positionDiv('ajax-smallframe');
}

function repositionDiv(){
	if(objs.style.display == 'none' || objs.style.display == '' || objs.style.display == 'undefined'){
		return;
	}
	var objs = document.getElementById(id);
	var obj2 = document.getElementById('fade-out');
	var width = getViewportSize("width");
	var height = getViewportSize("height");
	posleft = (width/2) - 250;
	postop = (height/2) - 250;
	if(posleft < 0) posleft = 0;
	if(postop < 0) postop = 0;
	objs.style.left = posleft + 'px';
	objs.style.top = postop + 'px';
	objs.style.display = 'block';
	obj2.style.display = 'block';
	return true;
}

function positionDiv(id) {
	var objs = document.getElementById(id);
	var obj2 = document.getElementById('fade-out');
	var width = getViewportSize("width");
	var height = getViewportSize("height");
	posleft = (width/2) - 250;
	postop = (height/2) - 250;
	if(posleft < 0) posleft = 0;
	if(postop < 0) postop = 0;
	objs.style.left = posleft + 'px';
	objs.style.top = postop + 'px';
	objs.style.display = 'block';
	obj2.style.display = 'block';
	return true;
}

function closeajaxpopup() {
	var objs = document.getElementById('ajax-smallframe');
	objs.style.display = 'none';
	var obj2 = document.getElementById('fade-out');
	obj2.style.display = 'none';
	var obj3 = document.getElementById('as_friend');
	if(obj3 != null && obj3.style) {
		obj3.style.display = 'none';
	}
	window.onresize = '';
	window.onkeypress='';
}

function getViewportSize(dimwanted) {
	var viewportwidth;
	var viewportheight;
 
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = window.innerWidth,
		viewportheight = window.innerHeight
	 }
 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

	else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)
	{
		viewportwidth = document.documentElement.clientWidth,
		viewportheight = document.documentElement.clientHeight
	}
 	// older versions of IE
 
 	else
	{
		viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		viewportheight = document.getElementsByTagName('body')[0].clientHeight
	}

	if(dimwanted == "width") {
		return viewportwidth;
	}else{
		return viewportheight;
	}
}

/***********************************************
* Dynamic Ajax Post/Get Requests
***********************************************/

function doAjaxSubmit(formid, url, divid, commands){
	//will submit form and echo response to page
	var params = $(formid).serialize();
	$(divid).update("<img src='/images/working.gif' />");
	
	new Ajax.Updater(divid, url, {
		method: 'post',
		parameters: params,
		evalScripts: true,
		onSuccess: function(transport) {
			location.hash = 'null';
			init_wysiwyg(divid);
			
			if(commands!=undefined){
				var cmd = commands.split(';');
				var failed = new Array();
				for ( var i in cmd ){
					if(cmd[i].trim!=''){
						try{
							eval(cmd[i]);
						}catch (e){
							failed.push(cmd[i])
						}
					}
				}
				if(failed.length > 0) {
					createCookie('commands', failed.join(';'), 1);
				}else{
					eraseCookie('commands');
				}
			}else{
				commands = readCookie('commands');
				if(commands != null) {
					var cmd = commands.split(';');
					var failed = new Array();
					for ( var i in cmd ){
						if(cmd[i].trim!=''){
							try{
								eval(cmd[i]);
							}catch (e){
								failed.push(cmd[i])
							}
						}
					}
					if(failed.length > 0) {
						createCookie('commands', failed.join(';'), 1);
					}else{
						eraseCookie('commands');
					}
				}
			}
		}
	});
}

function doAjaxGetSubmit(formid, url, divid, commands){
	//will submit form and echo response to page
	var params = $(formid).serialize();
	$(divid).update("<img src='/images/working.gif' />");
	
	new Ajax.Updater(divid, url, {
		method: 'get',
		evalScripts: true,
		parameters: params,
		onSuccess: function(transport) {
			location.hash = 'null';
			init_wysiwyg(divid);
			
			if(commands!=undefined){
				var cmd = commands.split(';');
				var failed = new Array();
				for ( var i in cmd ){
					if(cmd[i].trim!=''){
						try{
							eval(cmd[i]);
						}catch (e){
							failed.push(cmd[i])
						}
					}
				}
				if(failed.length > 0) {
					createCookie('commands', failed.join(';'), 1);
				}else{
					eraseCookie('commands');
				}
			}else{
				commands = readCookie('commands');
				if(commands != null) {
					var cmd = commands.split(';');
					var failed = new Array();
					for ( var i in cmd ){
						if(cmd[i].trim!=''){
							try{
								eval(cmd[i]);
							}catch (e){
								failed.push(cmd[i])
							}
						}
					}
					if(failed.length > 0) {
						createCookie('commands', failed.join(';'), 1);
					}else{
						eraseCookie('commands');
					}
				}
			}
		}
	});
}

function ajaxPOST(url, postString, containerid, do_not_jump){
	//will submit form and echo response to page
	if(do_not_jump!=true){
		Effect.ScrollTo(containerid, {offset:-60, duration:0.25});
	}
	new Ajax.Updater(containerid, url, {
		method:'post',
		parameters:postString,	  
		evalScripts: true,
		onComplete: function(transport){
		  	afterComp(containerid, do_not_jump)
	  	}
	});
	
	
	/*
	makePOSTRequest(url, postString);
	http_request.onreadystatechange = function() {//Call a function when the state changes.
		if(http_request.readyState == 4 && http_request.status == 200) {
			document.getElementById(divResult).innerHTML = http_request.responseText;
			try{widgInit()}
			catch(e){				
			}
		}
	}
	*/
}


function resortResults(key, module, action, dest, caller) {
	var page = location.href;
	var backuparguments = {};
	arguments['module'] = module;
	arguments['action'] = action;
	arguments['sortkey'] = key;
	if(sortkey == key) {
		if(dir == 'up') {
			arguments['sortkey'] = '';
			arguments['dir'] = '';
		}else{
			if(dir == 'down') {
				arguments['dir'] = 'up'
			}else{
				arguments['dir'] = 'down';
			}
		}
	}else{
		arguments['dir'] = 'down';
	}
	if(arguments['sortkey'] == '') {
		sortkey = '';
	}else{
		sortkey = key;
	}
	dir = arguments['dir'];
	var search_stuff = getChildInputValues(document.getElementById(module + '-search-form'));
	var newarguments = getArgsFromQueryString(search_stuff);
	for(value in newarguments) {
		if(newarguments[value] != '' && newarguments[value] != undefined) {
			arguments[value] = newarguments[value];
		}
	}
	for(value in arguments) {
		if(arguments[value] != '' && arguments[value] != undefined) {
			backuparguments[value] = arguments[value];
		}
	}
	var query_string = createQueryStringFromArgs(backuparguments);
	while(query_string.charAt(query_string.length - 1) == '&') {
		query_string = query_string.substring(0, query_string.length - 1);
	}
	//window.alert(query_string)
	ajaxpage('/blank.php' + query_string, dest);
}

function getArgsFromQueryString(query_string) {
	var args = new Object();
	var query = query_string;
	var pairs = query.split("&");
	for(var i = 0; i < pairs.length; i++) {
		var pos = pairs[i].indexOf('=');
		if (pos == -1) continue;
		var argname = pairs[i].substring(0,pos);
		var value = pairs[i].substring(pos+1);
		args[argname] = unescape(value);
	}
	return args;
}

function createQueryStringFromArgs(args) {
	var qs = '?';
	for(value in args) {
		qs += value + '=' + escape(args[value]) + '&';
	}
	qs = qs.substring(0, qs.length - 1);
	return qs;
}

function addVariableIfNecessary(url, name, value) {
	if(value == '') {
		return url;
	}
	var variable = escape(name) + "=" + escape(value);
	if(url.IndexOf('?') == -1) {
		return url + '?' + variable;
	}else{
		var lastCharacter = url.substr(url.length, 1);
		while(lastCharacter == '&') {
			url = url.substr(url.length, 1);
			lastCharacter = url.substr(url.length, 1);
		}
		return url + "&" + variable;
	}
}

function getQuery(name) {
	var obj = document.getElementsByTagName('INPUT');
	var args = new Object();
	var str = '';
	var count = 0;
	for(var i = 0; i < obj.length; i++) {
		if(obj[i].getAttribute('name') == 'value[]') {
			str = "value" + count;
			args[str] = obj[i].value;
			count++;
		}
	}
	qs = createQueryStringFromArgs(args);
	qs = qs.substring(1, qs.length);
	return "&" + qs;
}


/********************************************
**
**Enter User Defined Ajax Functions Below
*********************************************/

//global functions
function checkUserName(name){
	var postval = "uname=" + name;
	ajaxPOST('/blank.php?module=account&action=checkUserName', postval, 'username_status', true);
	
	
	/*makePOSTRequest('/blank.php?module=account&action=checkUserName', postval);
  	http_request.onreadystatechange = function() {//Call a function when the state changes.
		if(http_request.readyState == 4 && http_request.status == 200) {
			//document.getElementById(tdiv).innerHTML = "done";
			document.getElementById('username_status').innerHTML = http_request.responseText;
		}
	}*/	
}

function doZip(zip){
	do_ajaxpage('/blank.php?module=main&action=getCityState&zip='+zip, 'city_state',undefined,true);
}

function doPostal(postal, country, timezone, location_id){
	do_ajaxpage('/blank.php?module=location&action=getCityState&postal='+postal+'&country='+country+'&do_timezones='+timezone+'&location_id='+location_id, 'location_specific',undefined,true);
}


/**
**Jobbank
**/

function editjob(id){
	ajaxPOST('/blank.php?module=jobbank&action=editjob', 'id='+id, 'emp_form', true);
	/*makePOSTRequest('/blank.php?module=jobbank&action=editjob','id='+id);
	http_request.onreadystatechange = function() {
		if(http_request.readyState == 4 && http_request.status == 200) {
			document.getElementById('emp_form').innerHTML = http_request.responseText;
		}
	}*/
}

function deletejob(id){
	ajaxPOST('/blank.php?module=jobbank&action=deletejob', 'id='+id, 'emp_content', true);
/*
	makePOSTRequest('/blank.php?module=jobbank&action=deletejob','id='+id);
	http_request.onreadystatechange = function() {
		if(http_request.readyState == 4 && http_request.status == 200) {
			document.getElementById('emp_content').innerHTML = http_request.responseText;
		}
	}*/
}

function archivejob(id){
	ajaxPOST('/blank.php?module=jobbank&action=archivejob','id='+id,'emp_content', true);
	/*
	makePOSTRequest('/blank.php?module=jobbank&action=archivejob','id='+id);
	http_request.onreadystatechange = function() {
		if(http_request.readyState == 4 && http_request.status == 200) {
			document.getElementById('emp_content').innerHTML = http_request.responseText;
		}
	}*/
}


function doApply(){

	//will submit form and echo response to page
	form=$('apply');
	var postString = form.serialize();
	new Ajax.Request("/blank.php?do=jobbank_send_apply", {
		method:'post',
		parameters:postString,	  
		evalScripts: true,
		onComplete: function(transport){
		  	if(transport.responseText.substring(0,5)=="error"){
				addinfo(transport.responseText.substring(5));
			}else{
				addinfo(transport.responseText);
				closeajaxpopup();
				$('jobbank_apply').remove();
				if(document.location.hash!='' && document.location.hash!='#')
					ajaxpage('/blank.php?do=jobbank_display_applied','editable'); // added by Peter B to refresh the page once the move happens
			}
	  	}
	});
	/*
	ajaxSubmit(document.getElementById('apply'),"/blank.php?do=jobbank_send_apply");
	http_request.onreadystatechange = function() {//Call a function when the state changes.
		if(http_request.readyState == 4 && http_request.status == 200){
			if(http_request.responseText.substring(0,5)=="error"){
				addinfo(http_request.responseText.substring(5));
			}else{
				addinfo(http_request.responseText);
				closeajaxpopup();
				if(document.location.hash!='' && document.location.hash!='#')
					ajaxpage('/blank.php?do=jobbank_display_applied','editable'); // added by Peter B to refresh the page once the move happens
			}
		}
	}*/
}

/***
*Interview
***/

function requestNewInterviewTime(id, homepage){
	//submits, checks for error and either (a) echos error or (b) updates status on main page
	form=$('request_interview_frm');
	var postString = form.serialize();
	new Ajax.Request("/blank.php?do=interview_change_status&status=New%20Time%20Requested&id="+id+"&short="+homepage, {
		method:'post',
		parameters:postString,	  
		evalScripts: true,
		onComplete: function(transport){
		  	if(transport.responseText.substring(0,5)=="error"){
				addinfo(http_request.responseText.substring(5));
			}else{
				$('interviews').update(transport.responseText);
				closeajaxpopup();
			}
	  	}
	});
	/*
	ajaxSubmit(document.getElementById('request_interview_frm'),"/blank.php?do=interview_change_status&status=New%20Time%20Requested&id="+id+"&short="+homepage);
	
	http_request.onreadystatechange = function() {//Call a function when the state changes.
		if(http_request.readyState == 4 && http_request.status == 200){
			if(http_request.responseText.substring(0,5)=="error"){
				addinfo(http_request.responseText.substring(5));
			}else{
				document.getElementById('interviews').innerHTML = http_request.responseText;
				closeajaxpopup();
			}
		}
	}*/

}