	var win=0;
	function navBar( Obj, bgcolor ) {
			Obj.style.backgroundColor = bgcolor;
		}
	function chngvsb(object) {
		if(document.getElementById(object).style.display == 'none')
			document.getElementById(object).style.display = 'block';
			else
				document.getElementById(object).style.display = 'none';
	}

	function NewWindow(mypage,myname,w,h,scroll,pos){
		if(pos=="random"){
			LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
			}

		if(pos=="center"){
			LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
			}else if((pos!="center" && pos!="random") || pos==null){
				LeftPosition=0;
				TopPosition=20;
				}

		settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
		if(win){
			if(!win.closed) win.close(); 
			}
		win=window.open(mypage,myname,settings);
	}

	function orderBy(order)
	{
		document.getElementById('order').value = order;
		document.getElementById('page').value = 0;
		document.forms["frmSrch"].submit();
		return true;	
	}

	function openPage(order)
	{
		document.getElementById('page').value = order;
		document.forms["frmSrch"].submit();
		return true;	
	}
	var mailid = 0;
	function viewmail(id) {
	var i=0;
		if(mailid == id)
		{
			document.getElementById('mail'+id).style.display = 'none';
			mailid = 0;
		}
		else
		{
			for(i = 1; i <=3 ; i++)
				document.getElementById('mail'+i).style.display = 'none';
				document.getElementById('mail'+id).style.display = 'block';
				mailid = id;
		}	
	}
	function signup() {
		alert('كاربر گرامي\nبراي دريافت نام كاربري و كلمه عبور جهت وارد كردن اطلاعات و تشكيل پروفايل شركت خود با شماره تلفن 88457595 (موسسه سراج - مجري طرح) تماس حاصل فرماييد .');
	}

	function bsearch(id,nid)
	{
		var i;
		for(i = 0; i<3; i++ )
		document.getElementById('tasrch'+i).style.fontWeight = 'normal';
		document.getElementById('tasrch'+id).style.fontWeight = 'bold';
		document.getElementById('txtmsrch').name = nid;
	}
