﻿var evtbls=1;
var newsbls=1;
var sndntes=1;
var tools=1;
var itemnow=1;
var itemlast=0;



function mintbl(tblnm){
if(tblnm=="evtbl"){
if(evtbls==1){
evtbls=0;	
MM_effectSlide('evtbl', 1000, '100%', '0%', false);
}else{
MM_effectSlide('evtbl', 1000, '0%', '100%', false);
evtbls=1;	
}
}else if(tblnm=="newstbl"){
	
if(newsbls==1){
newsbls=0;	
MM_effectSlide('newstbl', 1000, '100%', '0%', false);
}else{
MM_effectSlide('newstbl', 1000, '0%', '100%', false);
newsbls=1;	
}

}else if(tblnm=="sndnte"){
	
if(sndntes==1){
sndntes=0;	
MM_effectSlide('sndnte', 1000, '100%', '0%', false);
}else{
MM_effectSlide('sndnte', 1000, '0%', '100%', false);
sndntes=1;	
}

}else if(tblnm=="tool"){
	
if(tools==1){
tools=0;	
MM_effectSlide('tool', 1000, '100%', '0%', false);
}else{
MM_effectSlide('tool', 1000, '0%', '100%', false);
tools=1;	
}

}
}

function login(st){
if(st==1){
MM_showHideLayers('logload','','show');	
}else{
MM_showHideLayers('logload','','hide');	
}
	
}



var req;
function loadXMLDoc(url) {
	req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
    	try {
			req = new XMLHttpRequest();
        } catch(e) {
			req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		req = false;
        	}
		}
    }
	req.onreadystatechange = function()
					{
				if (req.readyState == 4 && req.status == 200)
						{
					
						document.getElementById('cont').innerHTML=req.responseText
						alert(req.responseText)
						
						
						
					}
					}
	if(req) {
				req.open("GET", url, true);
		req.send(null);
		
	}
}
function note(st){
if(st==0){
document.getElementById('sendnoteform').innerHTML='<form action="admin/ritaadmin/forms/sendnote.php" method="post" enctype="application/x-www-form-urlencoded" name="sndnte" target="dotask" id="sndnte">                  <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">                    <tr>                      <td height="133" align="right" valign="top" id="evntt"><table width="100%" border="0" cellspacing="0" cellpadding="0">                        <tr>                          <td width="34%" height="71">&nbsp;</td>                          <td width="43%">&nbsp;</td>                          <td width="23%">&nbsp;</td>                        </tr>                        <tr>                          <td height="44">&nbsp;</td>                          <td align="center"> ...در حال ارسال پیام <img src="images/anm/indicator_blue_large.gif" width="32" height="32" align="middle" /></td>                          <td>&nbsp;</td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                        </tr>                      </table></td>                    </tr>                  </table>                </form>';	
}else if(st==1){
	
document.getElementById('sendnoteform').innerHTML='<form action="../admin/ritaadmin/forms/sendnote.php" method="post" enctype="application/x-www-form-urlencoded" name="sndnte" target="dotask" id="sndnte">                  <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">                    <tr>                      <td height="133" align="right" valign="top" id="evntt"><table width="100%" border="0" cellspacing="0" cellpadding="0">                        <tr>                          <td width="34%" height="71">&nbsp;</td>                          <td width="43%">&nbsp;</td>                          <td width="23%">&nbsp;</td>                        </tr>                        <tr>                          <td height="44">&nbsp;</td>                          <td align="center"> پیام شما با موفقیت ارسال شد <img src="../images/main/icon/accept.jpg" width="64" height="64" align="middle"/></td>                          <td>&nbsp;</td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                        </tr>                      </table></td>                    </tr>                  </table>                </form>';
setTimeout("note(3)",5000);
}else if(st==2){

document.getElementById('sendnoteform').innerHTML='<form action="../admin/ritaadmin/forms/sendnote.php" method="post" enctype="application/x-www-form-urlencoded" name="sndnte" target="dotask" id="sndnte">                  <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">                    <tr>                      <td height="133" align="right" valign="top" id="evntt"><table width="100%" border="0" cellspacing="0" cellpadding="0">                        <tr>                          <td width="34%" height="71">&nbsp;</td>                          <td width="43%">&nbsp;</td>                          <td width="23%">&nbsp;</td>                        </tr>                        <tr>                          <td height="44">&nbsp;</td>                          <td align="center"> پیام شما ارسال نشد <img src="../images/main/icon/block.jpg" width="64" height="64" align="middle"/></td>                          <td>&nbsp;</td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td align="center"></td>                          <td>&nbsp;</td>                        </tr>                      </table></td>                    </tr>                  </table>                </form>';	

setTimeout("note(3)",5000);

}else if(st==3){

document.getElementById('sendnoteform').innerHTML='<form action="admin/ritaadmin/forms/sendnote.php" method="post" enctype="application/x-www-form-urlencoded" name="sndnte" target="dotask" id="sndnte">                  <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">                    <tr>                      <td height="133" align="right" valign="top" id="evntt"><table width="100%" border="0" cellspacing="0" cellpadding="0">                        <tr>                          <td width="2%" height="35">&nbsp;</td>                          <td width="26%">&nbsp;</td>                          <td width="47%" align="right"><label>                            <input name="name" type="text" class="field" id="name"  dir="rtl" lang="fa" size="60" />                          </label></td>                          <td width="25%" align="left" class="text1">&nbsp;: نام شما</td>                        </tr>                        <tr>                          <td height="30">&nbsp;</td>                          <td>&nbsp;</td>                          <td align="right"><input name="contactway" type="text" class="field" id="contactway" size="60" /></td>                          <td align="left" class="text1">&nbsp;: ایمیل یا شماره تلفن</td>                        </tr>                        <tr>                          <td height="26">&nbsp;</td>                          <td>&nbsp;</td>                          <td align="right"><label>                            <select name="to" class="field" id="to" dir="rtl" lang="fa">                              <option value="1">ریاست موسسه</option>                              <option value="2">معاونت آموزشی</option>                              <option value="3">اساتید</option>                              <option value="0">مدیریت سایت</option>                            </select>                          </label></td>                          <td align="left" class="text1">&nbsp;: ارسال پیام به </td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td align="right"><label>                            <textarea name="text" cols="45" rows="5" id="text" dir="rtl" lang="fa"></textarea>                          </label></td>                          <td align="left" valign="top" class="text1">&nbsp;: متن پیام</td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td><label>                            <input name="button2" type="submit" class="button" id="button2" value="ارسال"  />                            <input name="button3" type="reset" class="button" id="button3" value="فرم جدید" />                          </label></td>                          <td>&nbsp;</td>                        </tr>                        <tr>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                          <td>&nbsp;</td>                        </tr>                      </table></td>                    </tr>                  </table>                </form>	';
}
	
}

function opennewsletter(gourl){
	aboutw=dhtmlmodal.open('aboutwindow', 'iframe', gourl , 'دربــاره موسســه', 'width=660px,height=400px,center=1,resize=0,scrolling=1')


} //End "opennewsletter" function
function claboutw(){
aboutw.hide();	

}

function itemsel(sel){
if(sel != itemnow){	
itemlast=itemnow;
itemnow=sel;

document.getElementById("item"+sel).className='itemsel';
if(itemlast!=0){
document.getElementById("item"+itemlast).className='itemnsel';
}
if(sel==1){
document.getElementById('mnfrm').src='inpage/home.php'
		
}else if(sel==2){
	document.getElementById('mnfrm').src='priods/itm01.php'
}else if(sel==3){
	document.getElementById('mnfrm').src='inpage/teach.php'
}else if(sel==4){
document.getElementById('mnfrm').src='inpage/contus.php'
}else if(sel==5){
	document.getElementById('mnfrm').src='inpage/aboutcent.php'
	
}else if(sel==6){
	document.getElementById('mnfrm').src='inpage/download.php'
	
}
}
}
function dourl(url,scrl){
document.getElementById("item"+itemnow).className='itemnsel';	
itemlast=0;
itemnow=0;
document.getElementById('mnfrm').src=url;
if(scrl==1){
document.getElementById('mnfrm').scrolling="yes"
}else{
document.getElementById('mnfrm').scrolling="no"
}
}
function chgpr(id){
document.getElementById(id).bgColor="#FFCC66";	
}
function chgpro(id){
		document.getElementById(id).bgColor="";	

}
/*---------------------------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------------------------*/