﻿Sub RollBar_MouseOver(objRow)

	Dim objColumn
	For Each objColumn In objRow.cells
		objColumn.className = objColumn.className & "_Over"
	Next
	
End Sub

Sub RollBar_MouseOut(objRow)

	Dim objColumn
	For Each objColumn In objRow.cells
		objColumn.className = Replace(objColumn.className, "_Over", "")
	Next

End Sub

Sub React(objRow)
	Set objTable = objRow.parentElement.parentElement
	If objTable.rows(1).style.display="none" Then
		objTable.rows(1).style.display=""
	Else
		objTable.rows(1).style.display="none"
		
	End If
End Sub

'---------------------------------------------------------------------------------------------------------------------
Function ShowFarsiKeyboard() 

	WindowTop = (screen.height-330)/2
	WindowLeft = (screen.width-696)/2
	strPosition = "Top=" & WindowTop & ",Left=" & WindowLeft 
		call window.open("FarsiKeyboard.asp", "FarsiKeyboard", "width=696,height=330,fullscreen=0,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0," & strPosition)

End Function

' Please use in head part
' vbscript:ShowFarsiKeyboard()
'---------------------------------------------------------------------------------------------------------------------
Function ShowInfo(strInfoFile, strTitle, iWidth, iHeight) 

	WindowTop = (screen.height-iHeight)/2
	WindowLeft = (screen.width-iWidth)/2
	strPosition = "Top=" & WindowTop & ",Left=" & WindowLeft 
		call window.open(strInfoFile, strTitle, "width=" & iWidth & ",height= " & iHeight & ",fullscreen=0,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0," & strPosition)

End Function

' Please use in head part
' vbscript:ShowInfo()
'---------------------------------------------------------------------------------------------------------------------
Function ShowPasokh(PasokhFile) 

	WindowTop = (screen.height-500)/2
	WindowLeft = (screen.width-650)/2
	strPosition = "Top=" & WindowTop & ",Left=" & WindowLeft 
		call window.open(PasokhFile, "Pasokh", "width=650,height=500,fullscreen=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0," & strPosition)

End Function

' Please use in head part
' vbscript:ShowPasokh()
'---------------------------------------------------------------------------------------------------------------------
Function ShowCalendarSettings() 

	WindowTop = (screen.height-520)/2
	WindowLeft = (screen.width-420)/2
	strPosition = "Top=" & WindowTop & ",Left=" & WindowLeft 
		call window.open("CalendarSettings.asp", "CalendarSettings", "width=420,height=520,fullscreen=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0," & strPosition)

End Function

' Please use in head part
' vbscript:ShowPasokh()
'---------------------------------------------------------------------------------------------------------------------
Function ShowSenderWin() 

	WindowTop = (screen.height-200)/2
	WindowLeft = (screen.width-650)/2
	strPosition = "Top=" & WindowTop & ",Left=" & WindowLeft 
		call window.open("StartSendingNewsletter.asp", "StartSendingNewsletter", "width=650,height=200,fullscreen=0,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0," & strPosition)

End Function

' Please use in head part
' vbscript:ShowSenderWin()
'---------------------------------------------------------------------------------------------------------------------
Function ShowChartWindow(chartFile) 

	WindowTop = (screen.height-500)/2
	WindowLeft = (screen.width-700)/2
	strPosition = "Top=" & WindowTop & ",Left=" & WindowLeft 
		call window.open(chartFile, "Chart", "width=700,height=500,fullscreen=0,directories=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0," & strPosition)

End Function

' Please use in head part
' vbscript:ShowChartWindow()
'---------------------------------------------------------------------------------------------------------------------
Function ShowReport(ReportFile) 
		call window.open(ReportFile, "Report", "width=700,height=500,fullscreen=0,directories=0,location=0,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=0")
End Function

' Please use in head part
' vbscript:ShowReport()
'---------------------------------------------------------------------------------------------------------------------
Function ShowDynamicContents() 
	call window.open("DynamicContents.asp", "DynamicContents", "fullscreen=0,directories=0,location=0,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=0")
End Function

' Please use in head part
' vbscript:ShowDynamicContents()
'---------------------------------------------------------------------------------------------------------------------
	sub PrintPreview()
		Dim str_DynamicArea
		str_DynamicArea = DynamicArea.innerHTML
		ExternalTable.outerHTML = str_DynamicArea
		DynamicHelpDiv.style.display="none"
		if IsObject(SearchDiv) then SearchDiv.style.display="none"
		if IsObject(RangeDiv) then RangeDiv.style.display="none"
		if IsObject(LinkDiv) then LinkDiv.style.display="none"
		window.print()
	End sub	
'---------------------------------------------------------------------------------------------------------------------	
	Sub ChangeOrderPicture(obj)
		strPic = obj.src
		If instr(1,strPic,"Disable") > 0 Then
			strPic = replace(strPic,"Disable","MouseOver")
			obj.src = strPic
		ElseIf instr(1,strPic,"MouseOver") > 0 Then
			strPic = replace(strPic,"MouseOver","Disable")
			obj.src = strPic
		End If
	End Sub
'---------------------------------------------------------------------------------------------------------------------
	Sub SetAsHomepage()   
		HomePageAlert.addBehavior("#default#homePage")
		HomePageAlert.setHomePage("http://mbm.ir")
	End Sub

