var popup_ver = 8484786984;
function popupClose()
{
	$('#popup').css('display', 'none');
}


function popupDisplay(msg, id, success, info)
{
	//var id_h = document.getElementById(id).clientHeight;
	//var id_w = document.getElementById(id).clientWidth;

	id_h = document.getElementById(id).offsetHeight;
	id_w = document.getElementById(id).offsetWidth;
	
	var pop_h = $('#popup_msg').css('height').replace('px','');
	var pop_w =  $('#popup_msg').css('width').replace('px','');
	
	//alert(id_h + " " + id_w + " " + pop_h + " " + pop_w);

	$('#popup_overlay').css('height', id_h + 'px');
	$('#popup_overlay').css('width', id_w + 'px');
	$('#popup_msg').css('margin-top', ((id_h - pop_h) / 2) + "px");
	$('#popup_msg').css('margin-left', ((id_w - pop_w) / 2) + "px");
	$('#ok_button').css('margin-top', (((id_h - pop_h) / 2) + 140) + "px");
	$('#ok_button').css('margin-left', (((id_w - pop_w) / 2) + 260) + "px");
	$('#popup_msg_text').css('margin-top', (((id_h - pop_h) / 2) + 60) + "px");
	$('#popup_msg_text').css('margin-left', (((id_w - pop_w) / 2) + 2) + "px");

	$('#popup').css('display', 'block');
	$("#popup").removeClass("success");
	$("#popup").removeClass("error");

	if(success)
		$("#popup").addClass("success");
	else
		$("#popup").addClass("error");
	
	$('#popup_msg_text').html(msg);
  
  if(info)
		$("#popup").addClass("info");
	else
		$("#popup").removeClass("info");

}

function popupDisplayUgurluActivation(msg, id)
{
    //alert(msg);
	id_h = document.getElementById(id).offsetHeight;
	id_w = document.getElementById(id).offsetWidth;
	
	var pop_h = $('#popup_msg').css('height').replace('px','');
	var pop_w =  $('#popup_msg').css('width').replace('px','');
	
	//alert(id_h + " " + id_w + " " + pop_h + " " + pop_w);

	$('#popup_overlayUG').css('height', id_h + 'px');
	$('#popup_overlayUG').css('width', id_w + 'px');
	$('#popup_msg').css('margin-top', ((id_h - pop_h) / 2) + "px");
	$('#popup_msg').css('margin-left', ((id_w - pop_w) / 2) + "px");
//	$('#ok_button').css('margin-top', (((id_h - pop_h) / 2) + 140) + "px");
//	$('#ok_button').css('margin-left', (((id_w - pop_w) / 2) + 260) + "px");
//	$('#popup_msg_text').css('margin-top', (((id_h - pop_h) / 2) + 60) + "px");
//	$('#popup_msg_text').css('margin-left', (((id_w - pop_w) / 2) + 2) + "px");

	$('#popupUG').css('display', 'block');
	$("#popupUG").removeClass("success");
	$("#popupUG").removeClass("error");

	
//	$('#popup_msg_text').html(msg);
  
	$("#popupUG").addClass("info");

}

function getElementHeight(Elem) {
	
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all){
			var elem = document.all[Elem];
		}
		if (op5) { 
			xPos = elem.style.pixelHeight;
		} else {
			xPos = elem.offsetHeight;
		}
		return xPos;
}

function getElementWidth(Elem) {
	
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all){
			var elem = document.all[Elem];
		}
		else {
			xPos = elem.offsetWidth;
		}
		return xPos;
	
}
