
//Copytext to clipboard- by Gennero (patrice.gennero@voila.fr)
//Submited to DynamicDrive.com
//Visit http://www.dynamicdrive.com for this script

function copyit(field) {
    var content = eval("document.getElementById('"+field+"')");
//	alert(content);
    content.focus();
    content.select();
    range = content.createTextRange();
    range.execCommand("Copy");
    window.status="Contents copied to clipboard";
    setTimeout("window.status=''",1800);
}

//<html>

//<body>
//<script type="text/javascript">
//document.write("<p>OnLine: ")
//document.write(navigator.onLine + "</p>")
//<//script>
//</body>

//</html>


//////////////////////////////////////// loading
//    document.write('<div  id="loading" align=center style="font-size:3px;text-shadow:Gray; top:20px; left:0px;position:absolute;background-color:#136DAD ;width:100%; height:1200px; opacity:0.8;filter:alpha(opacity=80); z-index:50;vertical-align:top"><IMG src="images/Loading.gif"><BR><IMG src="Database/Advert/free4c.gif"></div>');
document.write('<div  id="loading" onclick="this.style.display='+"'"+'none'+"'"+';" align=center style="font-size:3px;text-shadow:Gray; top:20px; left:0px;position:absolute;background-color:#136DAD ;width:100%; height:1200px; opacity:0.8;filter:alpha(opacity=80); z-index:50;vertical-align:top"><IMG src="images/Loading.gif"></div>');

function addLoadEvent(func) {
//  document.getElementById("bod").style.visibility=hidden;
  var oldonload = window.onload;
  if (typeof(window.onload)=='function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(
	function() {
	  document.getElementById("loading").style.display="none";
	  //document.getElementById("loading3").style.display="block";
	}
);
///////////////////////////////////////////////////// ajax and java
var request = false;
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = false;
}
}
}

var sign="rahgiri";

function PAjax(id,url) {
var loadstatustext="<img src='images/loading13.gif' />";
//url=url+document.getElementById('nc').value;
//alert(url);
document.getElementById(id).innerHTML=loadstatustext; 
request.open("GET", url,true);
request.onreadystatechange = function pajax1() {
if (request.readyState == 4) {
	if (request.status == 200) {
		var response = request.responseText.split("|");
		document.getElementById(id).innerHTML = response[0];
	} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	} ;
	return false;
};
request.send(null);
	return false;
}

function PAjax1(id,url,tid) {
var loadstatustext="<DIV style='text-align:center;font-family:tahoma;Font-size:11px'><img src='images/loading11.gif' /><BR>چند لحظه صبر کنید.<BR>صفحه در حال بارگذاری می باشد.</DIV>";
//url=url+document.getElementById('nc').value;
//alert(url);
document.getElementById(id).innerHTML=loadstatustext; 
request.open("GET", url,true);
request.onreadystatechange = function pajax1() {
if (request.readyState == 4) {
	if (request.status == 200) {
		var response = request.responseText.split("|");
		document.getElementById(id).innerHTML = response[0];
		document.getElementById('men2').className='Menu';
		document.getElementById('men3').className='Menu';
		document.getElementById('men4').className='Menu';
		document.getElementById('men5').className='Menu';
		document.getElementById('men21').className='Menu';
		document.getElementById(tid).className='Menu2';
	} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	} ;
	return false;
};
request.send(null);
	return false;
}



function DelF(purl) {
var g;
g=confirm('این کالا حذف شود ؟');
if(g){
	document.location=purl;	
	};

}

function closed(nid) {
	document.getElementById(nid).style.display="none"
}

function AFrame() {
var Heit,Wid,FType,bgC,BC,g,Siz,Row,Col,Tit,TC;
FType=document.getElementById("ft").value;
Row=document.getElementById("row").value;
Col=document.getElementById("col").value;
Siz=document.getElementById("siz").value;
if(Siz==1){sw=80;sh=75};
if(Siz==2){sw=100;sh=90};
if(Siz==3){sw=130;sh=120};
Tit=document.getElementById("tit").value;
Wid=(Col*sw)+(10*Col)
Heit=(Row*sh)+(10*Row)+(10*Row*Tit)
bgC=document.getElementById("bgc").value;
BC=document.getElementById("bc").value;
TC=document.getElementById("tc").value;
g="<!--Free4c.com Start Frame Code -->\n<iframe frameborder=0 scrolling='no' marginheight=0 marginwidth=0 Height="+Heit+"px Width="+Wid+"px src='http://www.free4c.com/WebMasters.asp?FType="+ FType + "&bgColor="+bgC+"&Border="+BC+"&Col="+Col+"&Row="+Row+"&Title="+Tit+"&TColor="+TC+"&Size="+Siz+"'></iframe>\n<!--Free4c.com End Frame Code -->"
document.getElementById("fr").value=g;
document.getElementById("outp").href="SSI/WebMasterPrev.asp?col="+Col+"&row="+Row+"&FType="+FType+"&siz="+Siz+"&tit="+Tit+"&bgc="+bgC+"&bc="+BC+"&tc="+TC;
}


function chgback(td) {
	document.getElementById(td).style.backgroundImage="url(images/chu_c_c_on.gif)";
}
function chgback1(td) {
	document.getElementById(td).style.backgroundImage="url(images/chu_c_c.gif)";
}

function mover(td,tg,purl) {
	if (td.className!="IBox_click") { td.className="IBox_Over"; } 
	document.getElementById(tg).firstChild.nodeValue='بيشتر..';
	//document.getElementById(tg).src='../images/DL.jpg';
 }

function mout(td,tg) {
	if (td.className!="IBox_click") {td.className="IBox_out"; }
	document.getElementById(tg).firstChild.nodeValue='';
	//document.getElementById(tg).src='../images/_.gif';
 }

function mclick(td,purl,pid,ii) {
	var i,h;
	h=Math.floor(ii)+4;
	for (i=ii;i<h;i++) {
	document.getElementById(i).className="IBox_out";
	}
	td.className="IBox_click";
	//document.getElementById(tg).src='../images/DL.jpg';
	document.getElementById(pid).src=purl;
 }

function mlover(td) {
	if (td.className=="Box_List1") { td.className="Box_List1_1"; } 
	if (td.className=="Box_List") { td.className="Box_List_1"; } 
 }

function mlout(td) {
	if (td.className=="Box_List1_1") { td.className="Box_List1"; } 
	if (td.className=="Box_List_1") { td.className="Box_List"; } 
 }

//var tdold;
function mlclick(td,purl,num,stt,purl1) {
	document.title="vahid"
	var name1="";
	if (td.className!="Box_List_2" && td.className!="Box_List1_2") {
		for (i=stt;i<num;i++) {
	//		if (tdold!=null){
			if (document.getElementById(i).className=="Box_List1_2") {document.getElementById(i).className="Box_List1"};
			if (document.getElementById(i).className=="Box_List_2") {document.getElementById(i).className="Box_List"};
		//	}
		}
		
		if (td.className=="Box_List1_1") {td.className="Box_List1_2"};
		if (td.className=="Box_List_1") {td.className="Box_List_2"};
		//tdold=td;
		//document.LPic.src=purl;
	//	alert(purl1);
		name1=purl1;
		var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
		document.getElementById("det").innerHTML=loadstatustext; //Display "fetching page message"
		request.open("GET", name1,true);
		request.onreadystatechange = updatePage;
		request.send(null);
		setTimeout(third2,0);
	 }
 }

function mlclicknew(td,purl,num,stt,purl1,title1) {
	document.title="free download "+title1
	document.getElementById("freehead").innerHTML="free download "+title1
	document.getElementById("freehead1").innerHTML="free download "+title1
	var name1="";
	if (td.className!="Box_List_2" && td.className!="Box_List1_2") {
		for (i=stt;i<num;i++) {
	//		if (tdold!=null){
			if (document.getElementById(i).className=="Box_List1_2") {document.getElementById(i).className="Box_List1"};
			if (document.getElementById(i).className=="Box_List_2") {document.getElementById(i).className="Box_List"};
		//	}
		}
		
		if (td.className=="Box_List1_1") {td.className="Box_List1_2"};
		if (td.className=="Box_List_1") {td.className="Box_List_2"};
		//tdold=td;
		//document.LPic.src=purl;
	//	alert(purl1);
		name1=purl1;
		var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
		document.getElementById("det").innerHTML=loadstatustext; //Display "fetching page message"
		request.open("GET", name1,true);
		request.onreadystatechange = updatePage;
		request.send(null);
		setTimeout(third2,0);
	 }
 }

function mlclick1(td,purl,num,stt,purl1) {
	var name1="";
	if (td.className!="Box_List_2" && td.className!="Box_List1_2") {
		for (i=stt;i<num;i++) {
	//		if (tdold!=null){
			if (document.getElementById(i).className=="Box_List1_2") {document.getElementById(i).className="Box_List1"};
			if (document.getElementById(i).className=="Box_List_2") {document.getElementById(i).className="Box_List"};
		//	}
		}
		
		if (td.className=="Box_List1_1") {td.className="Box_List1_2"};
		if (td.className=="Box_List_1") {td.className="Box_List_2"};
		//tdold=td;
		//document.LPic.src=purl;
	//	alert(purl1);
		name1=purl1;
		var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
		document.getElementById("det").innerHTML=loadstatustext; //Display "fetching page message"
		request.open("GET", name1,true);
		request.onreadystatechange = updatePage;
		request.send(null);
		//setTimeout(third2,0);
	 }
 }

function amlclick(td,purl,num,stt,purl1) {
	var name1="";
//	if (td.className!="Box_List_2" && td.className!="Box_List1_2") {
		for (i=stt;i<num;i++) {
	//		if (tdold!=null){
			if (document.getElementById(i).className=="Box_List1_2") {document.getElementById(i).className="Box_List1"};
			if (document.getElementById(i).className=="Box_List_2") {document.getElementById(i).className="Box_List"};
		//	}
		}
		
		if (td.className=="Box_List1_1") {td.className="Box_List1_2"};
		if (td.className=="Box_List_1") {td.className="Box_List_2"};
		//tdold=td;
		//document.LPic.src=purl;
	//	alert(purl1);
		name1=purl1;
		var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
		document.getElementById("det").innerHTML=loadstatustext; //Display "fetching page message"
		request.open("GET", name1,true);
		request.onreadystatechange = updatePage;
		request.send(null);
		setTimeout(third3,0);
	// }
 }


function updatePage() {
if (request.readyState == 4) {
	if (request.status == 200) {
		var response = request.responseText.split("|");
		document.getElementById("det").innerHTML = response[0];
	} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
}

function BSort(purl1,td) {
	document.getElementById("siz").className="HBox";
	document.getElementById("Subj").className="HBox";
	document.getElementById("Con").className="HBox";
	document.getElementById("SD").className="HBox";
//	document.getElementById("Siz").className="HBox";
	document.getElementById("Titl").className="HBox";
	document.getElementById("DL").className="HBox";
	document.getElementById("Vote").className="HBox";
	document.getElementById(td.id).className="HBox1";
	var name1="";
	name1=purl1;
	var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
	document.getElementById("det1").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET", name1,true);
	request.setRequestHeader('Cache-Control', 'no-cache');
	request.onreadystatechange = updatePage1;
	request.send(null);
 }

function ABSort(purl1,td) {
	document.getElementById("Prev").className="HBox";
	document.getElementById("ID").className="HBox";
	document.getElementById("SD").className="HBox";
	document.getElementById("Show1").className="HBox";
	document.getElementById("DL").className="HBox";
	document.getElementById("Titl").className="HBox";
	document.getElementById("Vote").className="HBox";
	document.getElementById("Sub14").className="HBox";
	document.getElementById(td.id).className="HBox1";
	var name1="";
	name1=purl1;
	var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
	document.getElementById("det1").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET", name1,true);
	request.setRequestHeader('Cache-Control', 'no-cache');
	request.onreadystatechange = updatePage1;
	request.send(null);
 }

function updatePage1() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("det1").innerHTML = response[0];
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
}

function FCo(fc) {
	var HP=document.getElementById("hp").value; 
	document.getElementById("FPrice").firstChild.nodeValue=Math.floor(HP) * Math.floor(fc);
 }


function BPage(purl) {
	var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
	document.getElementById("det1").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET", purl,true);
	request.setRequestHeader('Cache-Control', 'no-cache');
	request.onreadystatechange = BPage1;
	request.send(null);
	third2();
 }

function BPage1() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("det1").innerHTML = response[0];
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
} 

function DelCom(id,url) {
document.getElementById("com2").style.display="block"
var L1=2;
var req = document.getElementById("name1").value; 
var cmt= document.getElementById("comment").value; 
var i1;
if(req==""){document.getElementById("name1").className="TxtField1";L1=1;} else{  document.getElementById("name1").className="TxtField";}
if(cmt==""){document.getElementById("comment").className="TxtField1";L1=1;} else{  document.getElementById("comment").className="TxtField";}
if(L1!=1) { 
var loadstatustext="<img src='images/loading11.gif' />";
document.getElementById(id).innerHTML=loadstatustext; 
request.open("GET", url,true);
request.onreadystatechange = function DelCom1() {
if (request.readyState == 4) {
	if (request.status == 200) {
		var response = request.responseText.split("|");
		document.getElementById(id).innerHTML = response[0];
	} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	} ;
	return false;
};
request.send(null);

	return false;
}
}



function ABPage(purl) {
	var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
	document.getElementById("det1").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET", purl,true);
	request.setRequestHeader('Cache-Control', 'no-cache');
	request.onreadystatechange = ABPage1;
	request.send(null);
	//third2();
 }

function ABPage1() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("det1").innerHTML = response[0];
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
} 


function linkc(ID,LN) {
	//document.location=LN;
	var lurl="SSI/Linkc.asp?Lin=" + ID;
//	alert(lurl);
	var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading110.gif' width='30px' /></div>";
	document.getElementById("links").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET", lurl,true);
	request.setRequestHeader('Cache-Control', 'no-cache');
	request.onreadystatechange = linkc1;
	request.send(null);

//	document.location = LN;
 }

function linkc1() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("links").innerHTML = response[0];
	third2();
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
} 

function MenLink3(purl) {
	request.open("GET", purl,true);
//	alert(purl)
	var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
	document.getElementById("sin").innerHTML=loadstatustext; //Display "fetching page message"
	request.setRequestHeader('Cache-Control', 'no-cache');
	request.onreadystatechange = MenLink31;
	request.send(null);
 }

function MenLink31() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("sin").innerHTML = response[0];
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
} 


function MenLink33(purl,id1) {
	document.getElementById("B1").className="Menu";
	document.getElementById("B2").className="Menu";
	document.getElementById("B3").className="Menu";
	document.getElementById("B4").className="Menu";
	id1.className="Menu2";
	request.open("GET", purl,true);
//	alert(purl)
	var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading11.gif' /><BR>اطلاعات در حال لود شدن می باشد...<BR><BR></div>"
	document.getElementById("bas").innerHTML=loadstatustext; //Display "fetching page message"
	request.setRequestHeader('Cache-Control', 'no-cache');
	request.onreadystatechange = MenLink331;
	request.send(null);
 }

function MenLink331() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("bas").innerHTML = response[0];
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
} 


function bclick(fid) {
//   document.getElementById("pop1").style.display="none";
//  document.getElementById("pop").style.display="block";
	var purl="SSI/Basket1.asp?ID=" + fid + "&FCount=" + document.getElementById("FCount").value;
	var loadstatustext="<div style='vertical-align:center;text-align:center; width:100%;'><img src='images/loading12.gif'/></div>"
	document.getElementById("pop").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET",purl,true);
	request.setRequestHeader('Cache-Control', 'no-cache');
	request.onreadystatechange = bclick1;
	request.send(null);
	document.getElementById("BT").disabled=true;
}

function bclick1() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("pop").innerHTML = response[0];
		} else
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
}

function b1click(f) {
	document.getElementById("pop").innerHTML ="";
	document.getElementById("BT").disabled=false;
	document.getElementById("pop11").innerHTML =f;
	
}

function pch() {
	if(document.getElementById("cplace1").checked==true)
		{
			document.getElementById("cravesh1").disabled=false;
			document.getElementById("cco").style.color="#000000";
		}
	else
		{
			document.getElementById("cravesh1").checked=false;
			document.getElementById("cravesh2").checked=true;
			document.getElementById("cravesh1").disabled=true;
			document.getElementById("cco").style.color="#CCCCCC";
		}
	rch();
	document.getElementById("sprice").value=(document.getElementById("price1").value*1)+(document.getElementById("price2").value*1)+(document.getElementById("price3").value*1);
	document.getElementById("cp4").innerHTML=document.getElementById("sprice").value+" ریال";
}

function rch() {
	if(document.getElementById("cravesh1").checked==true)
		{
			document.getElementById("cnoa1").disabled=true;
			document.getElementById("cnoa2").disabled=true;
			document.getElementById("cnoa3").disabled=false;
			document.getElementById("cnoa1").checked=false;
			document.getElementById("cnoa2").checked=false;
			document.getElementById("cnoa3").checked=true;

document.getElementById("cp2").innerHTML=document.getElementById("cnoa3").alt+" ریال";
document.getElementById("price2").value=document.getElementById("cnoa3").alt;

			document.getElementById("cr1").style.color="#CCCCCC";
			document.getElementById("cr2").style.color="#CCCCCC";
			document.getElementById("cr3").style.color="#000000";
		}
	else
		{
			document.getElementById("cnoa1").disabled=false;
			document.getElementById("cnoa2").disabled=false;

if(document.getElementById("cplace1").checked==false){
			document.getElementById("cnoa3").disabled=true;
			document.getElementById("cr3").style.color="#CCCCCC";
if(document.getElementById("cnoa3").checked==true){

			document.getElementById("cnoa1").checked=false;
			document.getElementById("cnoa2").checked=true;
			document.getElementById("cnoa3").checked=false;
document.getElementById("cp2").innerHTML=document.getElementById("cnoa2").alt+" ریال";
document.getElementById("price2").value=document.getElementById("cnoa2").alt;
}
}
			document.getElementById("cr1").style.color="#000000";
			document.getElementById("cr2").style.color="#000000";
		}
	document.getElementById("sprice").value=(document.getElementById("price1").value*1)+(document.getElementById("price2").value*1)+(document.getElementById("price3").value*1);
	document.getElementById("cp4").innerHTML=document.getElementById("sprice").value+" ریال";
}

function cn1(obj) {
	document.getElementById("cp2").innerHTML=obj+" ریال";
	document.getElementById("price2").value=obj;
	document.getElementById("sprice").value=(document.getElementById("price1").value*1)+(document.getElementById("price2").value*1)+(document.getElementById("price3").value*1);
	document.getElementById("cp4").innerHTML=document.getElementById("sprice").value+" ریال";
}

function endchout(f,bid) {
	var y='خرید شما با موفقیت ثبت شد.\nمهم: کد رهگیری را تا دریافت کالا، به خاطر داشته باشید.';
	alert(y);
	MenLink('Basket.asp?Page=3&Page1=2&BID='+bid);
}
function cg1(obj) {
	document.getElementById("cp3").innerHTML=obj+" ریال";
	document.getElementById("price3").value=obj;
	document.getElementById("sprice").value=(document.getElementById("price1").value*1)+(document.getElementById("price2").value*1)+(document.getElementById("price3").value*1);
	document.getElementById("cp4").innerHTML=document.getElementById("sprice").value+" ریال";
}

function chout() {
	var L1=2;
	
	var price1=document.getElementById("price1");
	var name1=document.getElementById("cname1");
	var name2=document.getElementById("cname2");
	var tel=document.getElementById("ctel");
	var mob=document.getElementById("cmob");
	var city=document.getElementById("ccity");
	var add=document.getElementById("cadd");
	if(name1.value==""){name1.className="Btn6";L1=1;} else{name1.className="Btn2";};
	if(name2.value==""){name2.className="Btn6";L1=1;} else{name2.className="Btn2";};
	if(tel.value==""){tel.className="Btn6";L1=1;} else{tel.className="Btn2";};
	if(mob.value==""){mob.className="Btn6";L1=1;} else{mob.className="Btn2";};
	if(city.value==""){city.className="Btn6";L1=1;} else{city.className="Btn2";};
	if(add.value==""){add.className="Btn6";L1=1;} else{add.className="Btn2";};
	if(price1.value=="0" || price1.value=="") {
		alert('سبد خرید شما خالی می باشد. خریدی انجام نشده است.');
		return false;
	};
	if(L1==1) {
		document.getElementById("cerr").innerHTML="کادرهای قرمز حتما باید تکمیل گردد.";
		return false;
	};
}

function chfish11(tf) {

	var L1=2;
	var name2=document.getElementById("cname2");
	var tel=document.getElementById("ctel");
	var mob=document.getElementById("cmob");
	var city=document.getElementById("ccity");
	var add=document.getElementById("cadd");
	var fish=document.getElementById("fnum");
	if(name2.value==""){name2.className="Btn11";L1=1;} else{name2.className="Btn2";};
	if(tel.value==""){tel.className="Btn11";L1=1;} else{tel.className="Btn2";};
	if(mob.value==""){mob.className="Btn11";L1=1;} else{mob.className="Btn2";};
	if(city.value==""){city.className="Btn11";L1=1;} else{city.className="Btn2";};
	if(add.value==""){add.className="Btn11";L1=1;} else{add.className="Btn2";};
	if(fish.value==""){fish.className="Btn11";L1=1;} else{fish.className="Btn2";};
	if(L1==1) {
		document.getElementById("cerr").innerHTML="کادرهای قرمز حتما باید تکمیل گردد.";
	}
	else{tf.submit()};
}


function IDCheck(purl) {
	var IDStr=document.getElementById("ID").value;
	IDStr=purl + "?ID=" + IDStr;
	var loadstatustext="<spam style='vertical-align:center;text-align:center; width:100%;height:100% '><img src='images/loading13.gif' width='70px' /></spam>"
	document.getElementById("IDC").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET", IDStr,true);
	request.setRequestHeader('Cache-Control', 'no-cache');
//	request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	request.onreadystatechange = IDCheck1;
	request.send(null);
 }

function IDCheck1() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("IDC").innerHTML = response[0];
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
}

function MailCheck(purl) {
	var IDStr=document.getElementById("email").value;
	IDStr=purl+"?Mail="+IDStr;
	var loadstatustext="<spam style='vertical-align:center;text-align:center; width:100%;height:100% '><img src='images/loading13.gif' width='70px' /></spam>"
	document.getElementById("MailC").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET", IDStr,true);
	request.onreadystatechange = MailCheck1;
	request.send(null);
 }

function MailCheck1() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("MailC").innerHTML = response[0];
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
}


function MenLink(url) {
	window.location=url;
	return;
}

function SignCheck(indx) {
if (indx=="10") {
	id=document.form1.reset();
}
var L1=2;
var users = document.form1.ID.value; 
var pass = document.form1.pass.value; 
var pass1 = document.form1.pass1.value;
var lenp=pass.length;
var lenu=users.length;
var mails = document.form1.email.value; 
var i1;
if (indx=="0" || indx=="10" || indx=="1" || indx=="11") {
	if (indx!="11" && indx!="0") {IDCheck("ssi/CheckID.asp");}
	if(lenu<4 || lenu>15){document.getElementById("ID").className="TxtField1";L1=1;} else{ document.getElementById("ID").className="TxtField";}
}
if (indx=="0" || indx=="10" || indx=="2") {
	if(lenp<4){document.getElementById("pass").className="TxtField1";L1=1;} else{ document.getElementById("pass").className="TxtField";}
	if((pass!=pass1 || pass=="" || lenp<4)){document.getElementById("pass1").className="TxtField1";L1=1;} else{  document.getElementById("pass1").className="TxtField";}
}
if (indx=="0" || indx=="10" || indx=="3" || indx=="31") {
	var  em_val = /^\w+@\w+(\.\w+?)/
	if(em_val.test(mails)){document.getElementById("email").className="TxtField";} else  { document.getElementById("email").className="TxtField1"; L1=1;}
	if (indx!="31" && indx!="0") {MailCheck("ssi/CheckMail.asp");}
}
if (indx=="0" || indx=="10" || indx=="4") {
	if(document.getElementById("ac").checked==false){document.getElementById("ac1").className="TxtField1";L1=1;} else{document.getElementById("ac1").className="TxtField";}
}
if (indx=="0") {
	if(L1==1) {third2();return false; };
}

}

function ReqCheck(indx) {
var L1=2;
var req = document.getElementById("req").value; 
var i1;
if(req==""){document.getElementById("req").className="TxtField1";L1=1;} else{  document.getElementById("req").className="TxtField";}
if(L1==1) {return false; };


}

function ComCheck1() {
var L1=2;
var req = document.getElementById("name1").value; 
var cmt= document.getElementById("comment").value; 
var i1;
if(req==""){document.getElementById("name1").className="TxtField1";L1=1;} else{  document.getElementById("name1").className="TxtField";}
if(cmt==""){document.getElementById("comment").className="TxtField1";L1=1;} else{  document.getElementById("comment").className="TxtField";}
if(L1==1) {return false; };
}


function SignInC(tf) {
var L1=2;
var user = document.form1.ID1.value; 
var pass = document.form1.Pass1.value; 
if (pass=="") {L1=1;document.getElementById("Pass1").className="TxtField1";} else {document.getElementById("Pass1").className="TxtField";}
if (user=="") {L1=1;document.getElementById("ID1").className="TxtField1";}  else {document.getElementById("ID1").className="TxtField";}
if (L1==2) {var id=document.form1.submit(false);}  else {document.getElementById("IDC").firstChild.nodeValue="کد کاربری و یا کلمه عبور وارد نشده است"}
}

function MenLink(url) {
	window.location=url;
	return;
}


function MenLink1(url) {
	window.open(url,'_blank');
	//return;
}

function ForgetP() {
	document.getElementById("FP").style.display="block";
}

function SendP() {
	var IDStr=document.getElementById("FPass").value;
	IDStr="ssi/SendPass.asp?Mail="+IDStr;
	var loadstatustext="<spam style='vertical-align:center;text-align:center; width:100%;height:100% '><img src='images/loading13.gif' width='70px' /></spam>"
	document.getElementById("ChM").innerHTML=loadstatustext; //Display "fetching page message"
	request.open("GET", IDStr,true);
	request.onreadystatechange = SendP1;
	request.send(null);
 }

function SendP1() {
	if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("ChM").innerHTML = response[0];
		} else 
			alert("خطایی رخ داده است. لطفا صفحه را دوباره لود کنید");
	}
}

function Serch(url) {
//	alert(url)
	var url1=url+ "&Title=" + document.getElementById("Search1").value;
	window.location=url1;
	return;
}

function menover(td) {
	if (td.className!="Menu2") { td.className="Menu1"; } 
	if (td.className!="Menu2") { td.className="Menu1"; } 
 }

function menout(td) {
	if (td.className!="Menu2") { td.className="Menu"; } 
	if (td.className!="Menu2") { td.className="Menu"; } 
 }

function Sdet() {
	if (document.getElementById("Ser").className=="SDet") {document.getElementById("Ser").className="SDet1";}
	else {document.getElementById("Ser").className="SDet"};
 }
 
///////////////////////////////////////////////////////////// Scroll up
function third2(){
	var fifteenth=10;
	var sixteenth=0;
	var scrOfX = 0, scrOfY = 0;

	if(document.documentElement.scrollTop>200){
	do
	{
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		  }
			sixteenth=scrOfY-fifteenth;
			window.scroll(0,sixteenth);
	}while (sixteenth>190);
	}
	else if (document.documentElement.scrollTop<180){
	do
	{
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		  }
			sixteenth=scrOfY+fifteenth;
			window.scroll(0,sixteenth);
	}while (sixteenth<190);
	}

}

function third3(){
	var fifteenth=10;
	var sixteenth=0;
	var scrOfX = 0, scrOfY = 0;

	if(document.documentElement.scrollTop>670){
	do
	{
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		  }
			sixteenth=scrOfY-fifteenth;
			window.scroll(0,sixteenth);
	}while (sixteenth>660);
	}
	else if (document.documentElement.scrollTop<650){
	do
	{
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		  }
			sixteenth=scrOfY+fifteenth;
			window.scroll(0,sixteenth);
	}while (sixteenth<660);
	}

}

function third4(){
	var fifteenth=10;
	var sixteenth=0;
	var scrOfX = 0, scrOfY = 0;

	if(document.documentElement.scrollTop>570){
	do
	{
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		  }
			sixteenth=scrOfY-fifteenth;
			window.scroll(0,sixteenth);
	}while (sixteenth>560);
	}
	else if (document.documentElement.scrollTop<550){
	do
	{
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		  }
			sixteenth=scrOfY+fifteenth;
			window.scroll(0,sixteenth);
	}while (sixteenth<560);
	}

}

function third5(){
	var fifteenth=1;
	var sixteenth=0;
	var scrOfX = 0, scrOfY = 0;

	if (document.documentElement.scrollTop<140){
	do
	{
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		  }
			sixteenth=scrOfY+fifteenth;
			window.scroll(0,sixteenth);
	}while (sixteenth<140);
	}

}



