<!--
var m
function openModal(l){
m =  new Control.Modal($(l),{opacity: 0.5});
m.open();
}

function closeModal(){

m.close();

}

function openModalIframe(l){
m =  new Control.Modal($(l),{iframe: true,
			width: 700,
			height: 480});
m.open();
fixAbsentCursor();
return false;
}

function fixAbsentCursor() { $('modal_overlay').style.position = 'absolute'; }
//######################################################	
		

 var valid, valid2, valid3

	function set_form_validation(formid){
	valid = new Validation(formid, {immediate : true});
	}
	
	function set_form_validation_2(formid){
	valid2 = new Validation(formid, {immediate : true});
	}

	function set_form_validation_submit(formid){
	valid3 = new Validation(formid, {immediate : false});
	}
	
	

function submit_form_ajax(glassbox_id, form_id, update_div, action, after_action, target, validate) {

Element.update('debug','')

if (typeof(validate) != "undefined"){
if (typeof(valid) != "undefined") {
if (!valid.validate()){
valid.reset()
return false;
}
}
}

if(glassbox_id!=''&&glassbox_id!='mybox_stay'){
THIS.fadeBox(glassbox_id)
}


	var url = "ajax/ajax.asp?a="+action;

	var post = Form.serialize(form_id)
	
    var opt = {
  
    method: 'post',
   
    postBody:post ,
    
    onSuccess: function(t) {
	
	
	
		showResponse(t.responseText, form_id, update_div, after_action, target)
    },
   
    on404: function(t) {
        alert('Error 404: location "' + t.statusText + '" was not found.');
    },
  
    onFailure: function(t) {
	Dialog.closeInfo()
	
	
	Element.update('debug',t.responseText)
       
    }
}

new Ajax.Request(url, opt);

	
	}
	






	
function showResponse(rText, form_id, update_div, after_action, target)
	{

if (after_action != ''){

update_data_ajax(after_action, target, '');
}else{

Element.update(update_div,rText); 
}
}






function update_data_ajax (action, target, idd) {

idd = idd.replace(/ /g, "%20");



var pp = 'id='+idd;


	var url = "ajax/ajax.asp?a="+action;
	
	Element.update(target,'<img src=\"ajax/loading.gif\" width=\"15\" border=\"0\" title=\"Loading...\"/>')
	

	
	var post = pp;
	
var opt = {
   
    method: 'post',
   
    postBody:post ,
  
    onSuccess: function(t) {
	Element.update(target,t.responseText);
    },
   
    on404: function(t) {
        debug.innerHTML = ('Error 404: location "' + t.statusText + '" was not found.');
    },
    
    onFailure: function(t) {
        debug.innerHTML = ('Error ' + t.status + ' -- ' + t.statusText + ' -- '+t.responseText);
    }
}


new Ajax.Request(url, opt);
	}


function update_data_ajax_nopic (action, target, idd) {

idd = idd.replace(/ /g, "%20");


var pp = 'id='+idd;


	var url = "ajax/ajax.asp?a="+action;
	
	
	
	var post = pp;
	
var opt = {
  
    method: 'post',
 
    postBody:post ,
    
    onSuccess: function(t) {
	Element.update(target,t.responseText);
    },
   
    on404: function(t) {
        debug.innerHTML = ('Error 404: location "' + t.statusText + '" was not found.');
    },

    onFailure: function(t) {
        debug.innerHTML = ('Error ' + t.status + ' -- ' + t.statusText + ' -- '+t.responseText);
    }
}


new Ajax.Request(url, opt);
	}



var m = ""
var c = false
function mm(i){

m = new Control.Modal(i,{beforeClose: function(){
if(!c)
{return false;}
}});
m.open();

return false;
}

function closeM(){
c = true;
m.close();
c = false;
}

//AJAX glassbox_text Start
path_to_root_dir = "";
//AJAX glassbox_text end
