var xmlHttp;
var id;
var colorwa;
var Adadesh;
var starteshA;
var nanayok;

function showColor(warn,adadesh,startesh,nanay,moval4,moval5,moval6,moval7){


	colorwa = warn;
	Adadesh = encodeURI(adadesh);
	starteshA = encodeURI(startesh);
	nanayok = encodeURI(nanay);
	moval4 = encodeURI(moval4);
	moval5 = encodeURI(moval5);
	moval6 = encodeURI(moval6);
	moval7 = encodeURI(moval7);
	
var str = "r="+(new Date().getTime()) ;



id = "HmyColorNew";

if (colorwa == "MaxCount"){

	var url="MaxCount_Div.php?r="+(new Date().getTime());
	
}



if (colorwa == "TellFriend"){
	
	var mYourEmail = document.getElementById('xYourEmail2').value;
	var mFriendEmail = document.getElementById('xFriendEmail').value;
	var mPicCode = document.getElementById('PicCode_Friend2').value;
	
	var myError;
 if (mPicCode == ''){
 	alert('کد امنیتی وارد نشده است');
 	myError='yes';
 }
 
 if (mYourEmail == ''){
 	alert('ایمیل شما وارد نشده است');
 	myError='yes';
 }
 
  if (mFriendEmail == ''){
 	alert('لطفا ایمیل دوست خود را وارد نمایید');
 	myError='yes';
 }

 if (myError != 'yes'){
	//document.all.TellFriend.disabled=true;
	var url="TellAFriend.php?mYourEmail="+mYourEmail+
	'&mFriendEmail='+mFriendEmail+'&mPicCode='+mPicCode+'&mURL='+Adadesh+'&r='+(new Date().getTime());
 }else{
 	var url="";
 }
// alert(url);
}

if (colorwa == "Retr_Fish"){

	var url="eshop_Retr_Fish.php?r="+(new Date().getTime());
	
}


if (colorwa == "LoginCheck"){
		
	var xUsername_LoginOkk = encodeURI(document.getElementById('xUsername_Login').value);
	var xPassword_LoginOkk = encodeURI(document.getElementById('xPassword_Login').value);

/*
	if (document.all.No_Login[0].checked == true){
		var No_Login_No=document.all.No_Login[0].value;
	}
	if (document.all.No_Login[1].checked == true){
		var No_Login_No=document.all.No_Login[1].value;
	}
*/
	//alert(xUsername_LoginOkk);
var url="Check.php?xUsername_Login="+xUsername_LoginOkk+'&xPassword_Login='+xPassword_LoginOkk+'&r='+(new Date().getTime());

}


if (colorwa == "GalleryShow"){
	
	var url="GalleryShow.php?XID="+Adadesh+"&r="+(new Date().getTime());
	
}

if (colorwa == "Special"){
	
	var url="Special_Div.php?r="+(new Date().getTime());
	
}


if (colorwa == "retr_dropdownN"){
	//document.getElementById(starteshA+'Check').innerHTML="<p align='right'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";			
	var url="retr_dropdown.php?xIDG="+Adadesh+'&r='+(new Date().getTime());
	//alert(url);
}


if (colorwa == "Group_Search_Load"){
	
	var url="Group_Search_Div.php?IDGR="+Adadesh+'&r='+(new Date().getTime());
}


if (colorwa == "Group_Search_Load2"){
	
	var url="Group_Search_Div.php?IDGR="+Adadesh+'&r='+(new Date().getTime());
}

if (colorwa == "ViewBGroup"){

	var url="ViewByGroup_News.php?IDN="+Adadesh+'&r='+(new Date().getTime());

}

if (colorwa == "AgentsLoad"){

	var url="Agents_Div.php?r="+(new Date().getTime());
	
}

if (colorwa == "ServicesLoad"){

	var url="Services_Div.php?r="+(new Date().getTime());
	
}

if (colorwa == "ArticlesLoad"){

	var url="Articles_Div.php?r="+(new Date().getTime());
	
}

if (colorwa == "Tosie"){

	var url="Tosie.php?IDFaq="+Adadesh+'&IDComment='+starteshA+'&r='+(new Date().getTime());
	
}

if (colorwa == "Mokhalef"){
	
	var url="Mokhalef.php?IDFaq="+Adadesh+'&IDComment='+starteshA+'&r='+(new Date().getTime());	
}


if (colorwa == "Reg_Class"){

	var url="Reg_Class.php?CID="+Adadesh+'&r='+(new Date().getTime());
	
}



if (colorwa == "Order_product_buy"){

	var url="Order_buy_Pro.php?username_order="+starteshA+'&tozihat_order='+Adadesh+
	'&pro_id='+nanayok+'&r='+(new Date().getTime());
	//alert(url);
}


if (colorwa == "company"){
var url="Retrive_Folders.php?r="+(new Date().getTime());
}

if (colorwa == "FinalBuy"){
var url="eshop_FinalBuy.php?r="+(new Date().getTime());
}



if (colorwa == "Reg_Order"){
	//alert(document.getElementById('NO_Type3'));
	if (document.getElementById('NO_Type1').checked){
		var NO_Type = document.getElementById('NO_Type1').value;
	}
	if (document.getElementById('NO_Type2') != null){
		if (document.getElementById('NO_Type2').checked){
			var NO_Type = document.getElementById('NO_Type2').value;
		}
	}
	if (document.getElementById('NO_Type3') != null){
		if (document.getElementById('NO_Type3').checked){
			var NO_Type = document.getElementById('NO_Type3').value;
		}	
	}

	// var NO_Type = encodeURI(document.getElementById('NO_Type').value);
	var url="Reg_Order.php?Idpro="+Adadesh+'&NoType='+NO_Type+'&r='+(new Date().getTime());
}

if (colorwa == "RegisterNewUser"){
	//encodeURI(

	

	//alert(NoVaziatOkk);
	var NameOkk = encodeURI(document.getElementById('xname').value);
	
	//alert(NameOkk);
	
	var FamilyOkk = encodeURI(document.getElementById('xfamily').value);
	var UsernameOkk = encodeURI(document.getElementById('xusername').value);
	var PasswordOkk = encodeURI(document.getElementById('xpass').value);
	var EmailOkk = encodeURI(document.getElementById('xemail1').value);
		
		
	//var Country = encodeURI(document.all.Country.value);
	var PicCode = encodeURI(document.getElementById('PicCode').value);
	var TelNumber = encodeURI(document.getElementById('xtel').value);
	

	var YourResponse = encodeURI(document.getElementById('YourResponse').value);
	
	
   
	 var myww = document.getElementById('SecurityQuestions');
    var SQ = encodeURI(myww.options[myww.selectedIndex].value);	
    
	var YourAdrress = encodeURI(document.getElementById('xaddress').value);
	
    var myent3 = document.getElementById('xcity');
    var YourCity = encodeURI(myent3.options[myent3.selectedIndex].value);	
    
    var myentxc = document.getElementById('xcountry');
    var YourCountry = encodeURI(myentxc.options[myentxc.selectedIndex].value);	

     var myentxcJensiat = document.getElementById('xjensiat');
      
    var myentxcJensiatOK = encodeURI(myentxcJensiat.options[myentxcJensiat.selectedIndex].value);	


    //alert(myentshode3);
   // alert(NameOkk);
  
 var xmobile_T = encodeURI(document.getElementById('xmobile').value);
   
  
 
  // var xpeyk_hazine = encodeURI(document.getElementById('xpeyk_hazine').value);
 
   

	var url="SignUp2.php?Username="+UsernameOkk+'&xmobile='+xmobile_T+'&Password='+PasswordOkk+'&Name='+NameOkk+'&Family='+FamilyOkk+
	'&Email1='+EmailOkk+'&TelNumber='+TelNumber+
	'&YourCity='+YourCity+'&YourAdrress='+YourAdrress+'&SQ='+SQ+'&YourResponse='+YourResponse+
	'&YourCountry='+YourCountry+'&PicCode='+PicCode+
	'&xjensiat='+myentxcJensiatOK+
	'&r='+(new Date().getTime());
	
}


if (colorwa == "SendContact"){


	var xname = encodeURI(document.all.xname.value);
	var xemail = encodeURI(document.all.xemail.value);
	var xtel = encodeURI(document.all.xtel.value);
	var xtext = encodeURI(document.all.xtext.value);
	var PicCode = encodeURI(document.all.PicCode_Contact.value);

	var url="ContactSend.php?xname="+xname+'&xemail='+xemail+'&xtel='+xtel+'&xtext='+xtext+'&PicCode='+PicCode+'&r='+(new Date().getTime());

}


if (colorwa == "Send_Comment"){
	
	var Comment_Name = encodeURI(document.all.Comment_Name.value);
	var Comment_Email = encodeURI(document.all.Comment_Email.value);
	var Comment_Matn = encodeURI(document.all.Comment_Matn.value);
	var PicCode = encodeURI(document.all.PicCode.value);

 if (Comment_Name == ''){
 	alert('نام وارد نشده است');
 	return false;
 }
 
  if (Comment_Matn == ''){
 	alert('نظر شما وارد نشده است');
 	return false;
 }
	var url="Send_Comment.php?Comment_Name="+Comment_Name+'&Comment_Email='+Comment_Email+'&Comment_Matn='+Comment_Matn+'&PicCode='+PicCode+'&News_ID='+Adadesh+'&Mos_ID='+starteshA+'&r='+(new Date().getTime());

}


if (colorwa == "Send_CommentOp"){
	


	var YourName_Comm = encodeURI(document.all.YourName_Comm.value);
	var YourCity_Comm = encodeURI(document.all.YourCity_Comm.value);
	var YourEmail_Comm = encodeURI(document.all.YourEmail_Comm.value);
	var YourText_Comm = encodeURI(document.all.YourText_Comm.value);
	var PicCode = encodeURI(document.all.PicCode.value);

 if (YourName_Comm == ''){
 	alert('نام وارد نشده است');
 	return false;
 }
 
  if (YourText_Comm == ''){
 	alert('نظر شما وارد نشده است');
 	return false;
 }
 
	var url="Send_CommentOp.php?Comment_Name="+YourName_Comm+'&Comment_Email='+YourEmail_Comm+'&Comment_Matn='+YourText_Comm+'&PicCode='+PicCode+'&Comment_City='+YourCity_Comm+'&IDFaq='+Adadesh+'&r='+(new Date().getTime());

}


if (colorwa == "Comment_Filter"){
	var RNewest = document.all.R_Sort[0].checked;
	var RTosie = document.all.R_Sort[1].checked;

	var url="Filter_Comment.php?RNewest="+RNewest+'&RTosie='+RTosie+'&ID_FAQ='+Adadesh+'&r='+(new Date().getTime());

}








xmlHttp=GetXmlHttpObject(stateChanged);
xmlHttp.open("POST", url , true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); 
//xmlHttp.setRequestHeader("enctype", "multipart/form-data"); 
xmlHttp.send(str);


}






function stateChanged() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState=="loading")
{	
	
	if (colorwa == "GalleryShow"){
		document.getElementById('Image_Contenet').innerHTML="<p align='right'><img src='ajax-loader2.gif' border='0'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "LoginCheck"){
		document.getElementById('LoginS').innerHTML="<p align='right'><img src='ajax-loader2.gif' border='0'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Retr_Fish"){
		document.getElementById('KOLL').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	if (colorwa == "Send_Comment"){
		document.getElementById('Comment_DIV').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	if (colorwa == "Send_CommentOp"){
		document.getElementById('mComDiv').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	
	if (colorwa == "Reg_Class"){
		document.getElementById('LoadTD').innerHTML="<p align='right'><img src='loader.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	
	if (colorwa == "Comment_Filter"){
		document.getElementById('Comment_DIV').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";	
	}
	if (colorwa == "ArticlesLoad"){
		document.getElementById('Main_Div').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "RegisterNewUser"){
		document.getElementById('reg_DIVV').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "v_detail"){
		document.getElementById('PicCView').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";	
	}
	if (colorwa == "Order_product"){
		var mDivID = document.all.LastOrderID.value;
		document.getElementById('Buy_Product_'+mDivID).innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";	
	}
	if (colorwa == "Order_product_buy"){
		var mDivID = document.all.LastOrderID.value;
		document.getElementById('Buy_Product_'+mDivID).innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "SendContact"){
			document.getElementById('reg_DIVV').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Tosie"){
		//document.getElementById('IDmovafegh2').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Mokhalef"){
		//document.getElementById('IDmokhalef2').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";	
	}
	if (colorwa == "FinalBuy"){
		document.getElementById('basketWrap').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "ViewBGroup"){
		document.getElementById('Main_Top').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Reg_Order"){
		document.getElementById('MyOrder').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";
	}
	if (colorwa == "Group_Search_Load"){
		document.getElementById('Search_SubGroup_Div').innerHTML="<p align='right'><img src='ajax-loader2.gif'></p>";
	}
	if (colorwa == "Group_Search_Load2"){
		document.getElementById('Search_SubGroup_Div2').innerHTML="<p align='right'><img src='ajax-loader2.gif'></p>";
	}
	if (colorwa == "TellFriend"){
		document.getElementById('myFriendTell').innerHTML="<p align='right'><img src='ajax-loader2.gif'></p>";
	}
	if (colorwa == "retr_dropdownN"){
		document.getElementById('group_mycheckbox').innerHTML="<p align='right'><img src='ajax-loader2.gif'><font face='tahoma' size='1'>لطفا كمي صبر نماييد </font></p>";	
	}
}


if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
	if (colorwa == "GalleryShow"){
		document.getElementById('Image_Contenet').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "retr_dropdownN"){
		document.getElementById('group_mycheckbox').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "TellFriend"){
		//alert(xmlHttp.responseText);
		if (xmlHttp.responseText == 'PICCodePSplitFa'){
			alert('عبارت موجود در تصویر امنیتی به درستی وارد نشده است');
			document.getElementById('myFriendTell').innerHTML="";
		}else{
			document.getElementById('myFriendTell').innerHTML=xmlHttp.responseText;
		}
	}
	if (colorwa == "Group_Search_Load2"){
		document.getElementById('Search_SubGroup_Div2').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Group_Search_Load"){
		document.getElementById('Search_SubGroup_Div').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Reg_Order"){
		document.getElementById('MyOrder').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "LoginCheck"){
		document.getElementById('LoginS').innerHTML="";
		if (xmlHttp.responseText == "NotCorrect"){
			alert('نام کاربری یا کلمه عبور صحیح نیست');
			return false;
		}else{
			window.parent.location.href='Member.php';
			return true;
		}
	}
	if (colorwa == "ViewBGroup"){
		//alert('fgfgfg');
		document.getElementById('Main_Top').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "FinalBuy"){
		document.getElementById('basketWrap').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Retr_Fish"){
		//alert('bbbb');
		document.getElementById('KOLL').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Reg_Class"){
		document.getElementById('LoadTD').innerHTML=xmlHttp.responseText;
	}
	
	
	

		
	if (colorwa == "Tosie"){
		var Myresponseokw = xmlHttp.responseText;
		IDCOMNAZAR = Myresponseokw.split('PSplit');
		okk1a=decodeURI(IDCOMNAZAR[0]);
		okk2a=decodeURI(IDCOMNAZAR[1]);
		
		document.getElementById('IDmovafegh2'+okk2a).innerHTML="";
		document.getElementById('IDmovafegh'+okk2a).innerHTML=okk1a;
	}

	if (colorwa == "Mokhalef"){
		var Myresponseokw = xmlHttp.responseText;
		IDCOMNAZAR = Myresponseokw.split('PSplit');
		okk1a=decodeURI(IDCOMNAZAR[0]);
		okk2a=decodeURI(IDCOMNAZAR[1]);
		
		document.getElementById('IDmokhalef2'+okk2a).innerHTML="";
		document.getElementById('IDmokhalef'+okk2a).innerHTML=okk1a;
	}
	
	if (colorwa == "Comment_Filter"){
		document.getElementById('Comment_DIV').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "FilterV"){
		document.getElementById('Filter_Listt').innerHTML=xmlHttp.responseText;
	}
	if (colorwa == "Send_Comment"){
		if (xmlHttp.responseText == "Ok"){
			document.getElementById('Comment_DIV').innerHTML="<span style='background-color: #008000'><font color='#FFFFFF'>&nbsp;نظر شما ثبت شد </font></span>";
		}
		if (xmlHttp.responseText == "SecureCode"){
			document.getElementById('Comment_DIV').innerHTML="<b>&nbsp;<font color='#FFFFFF'><span style='background-color: #990100'> کد امنیتی اشتباه وارد شده است</span></font></b>";
		}
		//document.getElementById('Comment_DIV').innerHTML=xmlHttp.responseText;
	}
	
	if (colorwa == "Send_CommentOp"){
		if (xmlHttp.responseText == "Ok"){
			document.getElementById('mComDiv').innerHTML="<span style='background-color: #008000'><font color='#FFFFFF'>&nbsp;نظر شما ثبت شد </font></span>";
		}
		if (xmlHttp.responseText == "SecureCode"){
			document.getElementById('mComDiv').innerHTML="<b>&nbsp;<font color='#FFFFFF' style='font-size:8pt'><span style='background-color: #990100'> کد امنیتی اشتباه وارد شده است</span></font></b>";
		}
	}
	
	
	
	
	if (colorwa == "SendContact"){
		
		if (xmlHttp.responseText == "PICCode"){
			alert('عبارت موجود در تصویر امنیتی به درستی وارد نشده است');
			document.getElementById('reg_DIVV').innerHTML="عبارت موجود در تصویر امنیتی به درستی وارد نشده است";
		}else{
			alert('از تماس شما متشکریم ، در اسرع وقت با شما تماس خواهیم گرفت');
			document.getElementById('reg_DIVV').innerHTML="از تماس شما متشکریم";
		}
	}
	if (colorwa == "AboutLoad"){
		var Myresponseokw = xmlHttp.responseText;
		
		document.getElementById('Main_Div').innerHTML=Myresponseokw;
	}
	if (colorwa == "MaxCount"){
		var Myresponseokw = xmlHttp.responseText;
		
		document.getElementById('tab_Menu').innerHTML=Myresponseokw;
		
	}
	
	if (colorwa == "Newest"){
		var Myresponseokw = xmlHttp.responseText;
		
		document.getElementById('tab_Menu').innerHTML=Myresponseokw;
			
	}
	if (colorwa == "Special"){
		var Myresponseokw = xmlHttp.responseText;
		
		document.getElementById('tab_Menu').innerHTML=Myresponseokw;
			
	}
	
	if (colorwa == "AgentsLoad"){
		var Myresponseokw = xmlHttp.responseText;
		document.getElementById('Main_Div').innerHTML=Myresponseokw;
	}
	if (colorwa == "ServicesLoad"){
			var Myresponseokw = xmlHttp.responseText;
			document.getElementById('Main_Div').innerHTML=Myresponseokw;
	}
	
	if (colorwa == "ArticlesLoad"){
		var Myresponseokw = xmlHttp.responseText;
		document.getElementById('Main_Div').innerHTML=Myresponseokw;
	}
	
	
	if (colorwa == "Order_product_buy"){
		var Myresponseokw = xmlHttp.responseText;
		HeadAzMatnN = Myresponseokw.split('PSplit');
		okk1=decodeURI(HeadAzMatnN[0]);
		document.getElementById('Buy_Product_'+okk1).innerHTML="";
		okk2=decodeURI(HeadAzMatnN[1]);
		if (okk2 == "UsernameError"){
			alert('نام کاربری وارد شده در سیستم وجود ندارد');
		}else{
			alert('سفارش شما ارسال شد ، منتظر تماس ما باشید');
		}
	}
	
	if (colorwa == "company"){
			document.getElementById('company_msg').innerHTML=xmlHttp.responseText;
	}
		if (colorwa == "RegisterNewUser"){
			alert(xmlHttp.responseText);
				document.getElementById('reg_DIVV').innerHTML="";

		//alert(xmlHttp.responseText+'ffff');
		if (xmlHttp.responseText == "PICCode"){
			alert('خطا : عبارت موجود در تصویر به طور صحیح وارد نشده است');
			return false;
		}else if (xmlHttp.responseText == "CompanyName"){
			alert('خطا : در نام شرکت کاراکترهای نامفهوم وجود دارد');
			}else if (xmlHttp.responseText == "PasswordEmpty"){
			alert('خطا : کلمه عبور وارد نشده است');
			}else if (xmlHttp.responseText == "NameEmpty"){
			alert('خطا : نام وارد نشده است');
			}else if (xmlHttp.responseText == "FamilyEmpty"){
			alert('خطا : نام خانوادگی وارد نشده است');
			}else if (xmlHttp.responseText == "UsernameEmpty"){
			alert('خطا : نام کاربری دلخواه خود را وارد نکرده اید');
		}else if (xmlHttp.responseText == "UsernameExist"){
			alert('این نام کاربری قبلا در سیستم ثبت شده است ، لطفا نام کاربری دیگری انتخاب نمایید');
		}else if (xmlHttp.responseText == "EmailExist"){
			alert('آدرس ایمیل وارد شده در سیستم وجود دارد ، لطفا آدرس ایمیل دیگری وارد نمایید');
		}else if (xmlHttp.responseText == "UserName"){
			alert('لطفا برای نام کاربری فقط از حروف انگلیسی و اعداد و یا کاراکتر _ استفاده نمایید');
		}else {
			window.parent.location.href='Login.php?xuser='+xmlHttp.responseText;
		}
		
		
	}
	
	if (colorwa == "v_detail"){
	var Myresponseokw = xmlHttp.responseText;
		HeadAzMatn = Myresponseokw.split('<JODASSHOD>');
		
		okk1=decodeURI(HeadAzMatn[1]);
		okk0=decodeURI(HeadAzMatn[0]);
		okk2=decodeURI(HeadAzMatn[2]);
		okk3=decodeURI(HeadAzMatn[3]);
		okk4=decodeURI(HeadAzMatn[4]);
		okk5=decodeURI(HeadAzMatn[5]);
		okk6=decodeURI(HeadAzMatn[6]);
		
		document.getElementById('Noe_Sang').value=okk2;
		document.getElementById('Analyse_Fiz').value=okk1 ;
		document.getElementById('Analyse_Shi').value=okk0 ;
		document.getElementById('Rang').value=okk4 ;
		document.getElementById('Location_madan').value=okk5 ;
		document.getElementById('Code').value=okk6 ;
		if (okk3 != ''){
			document.getElementById('PicCView').style.display='';
			document.getElementById('PicCView').style.visibility='visible';
			document.getElementById('PicCView').innerHTML=okk3;
		}else{
			document.getElementById('PicCView').style.display='none';
			document.getElementById('PicCView').style.visibility='hidden';
		}
}


}
}

function GetXmlHttpObject(handler){ 

var objXmlHttp=null;
if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") ;
return ;
}

if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP";
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP";
} 
try
{
objXmlHttp=new ActiveXObject(strName);
objXmlHttp.onreadystatechange=handler ;
return objXmlHttp;
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled");
return;
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest();
objXmlHttp.onload=handler;
objXmlHttp.onerror=handler;
return objXmlHttp;
}
}

