// JavaScript Document
// load htmlarea
// Automatically calculates the editor base path based on the current URL.
var html_editor_url = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')) + '/class/fckeditor/';
var document_loaded = false;
var html_editor_window;
var html_editor_id;
var cart_language='tr';

function fn_open_editor(id, object, area) {
	


	html_editor_id = id;

//	html_editor_object = object;
//	html_editor_area = area;

	if (html_editor_window) {
		html_editor_window.close();
	}
	html_editor_window = window.open(html_editor_url+"popup.html?lang="+cart_language+'&btn_save=a&btn_close=e',"html_ed","status=no,top=100,left=100,height=600,width=850,resizable=yes");
	html_editor_window.focus();
}
 
function fn_vazgec() {
	
history.back();
}

function fn_common_resim_sil(image_id)  {
	
		var  yer =  "common_image"+image_id;
		var dosya=index_script + "?target=image&&mode=image_sil&image_id="+image_id+"&ajax=1";
//		document.getelementByID(yer).
		JXG(1,yer,dosya);
	}

function fn_yonlendir(hedef,id) {

	if (hedef=='') return false;
	
		location.href=hedef+id;
	}
	
function fn_mail_kaydet() {
		
		 if (document.getElementById("e_email").value == "" || document.getElementById("e_email").value.charAt(0) == " "){
		  alert("Lütfen e-posta adresinizi giriniz.");
		  return false; 
		 };
		   if (!document.getElementById("e_email").value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi)) {
			alert('Girilen e-posta adresi hatali. Lütfen uygun bir e-posta adresi giriniz.');
			return false;
		 };
		
		var email = document.getElementById("e_email").value;
		var  yer =  "e_email_list";
		var dosya="?target=mailbox&mode=ekle&email="+email;

		JXG(1,yer,dosya);
		
	}