﻿var xmlhttp = null;
//*************************************** cereat object ajax
function create(){
 if(window.ActiveXObject){
	xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
 }else{
    xmlhttp = new XMLHttpRequest();
 }
 return xmlhttp;
}
//*************************************************************************************************
//**********************************************change_disaff_id
function linkload_securityimages(path){
 create();
 document.getElementById("divpicload").innerHTML='<p align="center"><img src="'+path+'images/Loading.gif" width="16" height="16"/></p>';
 xmlhttp.open('GET',path+'includes/securityimages_show.php?path='+path,true);
 xmlhttp.onreadystatechange = load_securityimages;
 xmlhttp.send(null);
}
function load_securityimages() {
 if (xmlhttp.readyState == 4) {
 if (xmlhttp.status == 200) {
 document.getElementById("divpicload").innerHTML = xmlhttp.responseText;
 }else{
 alert("error load page");
}
}
}
//********************************************************** change color row table
function mark(face, field_color, text_color)
{
	if (document.documentElement){//if browser is IE5+ or NS6+
		face.style.backgroundColor=field_color;
		face.style.color=text_color;
	}
}
//********************************************************** calender
function cal()
{
  Calendar.setup({
	inputField     :    "date_input_1",   // id of the input field
	button         :    "date_btn_1",   // trigger for the calendar (button ID)
	ifFormat       :    "%Y/%m/%d",       // format of the input field
	dateType	   :	'jalali',
	weekNumbers    : false
});
}
function cal2()
{
  Calendar.setup({
	inputField     :    "date_input_2",   // id of the input field
	button         :    "date_btn_2",   // trigger for the calendar (button ID)
	ifFormat       :    "%Y/%m/%d",       // format of the input field
	dateType	   :	'jalali',
	weekNumbers    : false
});
}
