
var ie7 = (document.all && !window.opera && window.XMLHttpRequest) ? true : false;
var ajaxDate = new Date();
var mytime = "&ms="+ajaxDate.getTime();	
var BG;
var FG;

// Contact form windows - KIA System
function KIASystem(id,email)
{
	if(!BG) BG = document.getElementById('fade');
	if(!FG) FG = document.getElementById('em');

	$.get("includes/ajax/kia_ajax.php?em=" + email + "&kid=" + id + mytime,
		function(resp){
			$(FG).html(resp);	
		});
		if(ie7 == true)
		{
			IEBG(BG);
			IEFG(FG);
	    }
	    else
	    {
	    	$(BG).fadeIn(1800);
	    	$(FG).fadeIn(500);
	    }
}	

// Conact form windows - Contact Request
function ContactRequest(id)
{
	if(!BG) BG = document.getElementById('fade');
	if(!FG) FG = document.getElementById('em');
	
	$.get("includes/ajax/contact_ajax.php?bid=" + id + mytime,
 		function(resp){
 			$(FG).html(resp);
 		});
 		if(ie7 == true)
		{
			IEBG(BG);
			IEFG(FG);
	    }
	    else
	    {
	    	$(BG).fadeIn(1800);
	    	$(FG).fadeIn(500);
	    }
}

// ---------------------------------------------------------------
function IEBG(BG)
{
        $(BG).css('filter','alpha(opacity=55)').fadeIn(1000);
}


// ---------------------------------------------------------------
function IEFG(FG)
{
         $(FG).css('filter','alpha(opacity=100)').fadeIn(1500,function() {
                this.style.removeAttribute('filter');
         });

}

function close_pop(){
	document.getElementById('em').style.display='none';
	document.getElementById('fade').style.display='none';
}
