﻿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"
		TopRow1_ClientScript.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	
'---------------------------------------------------------------------------------------------------------------------	
	dim DefaultRowColor
	sub HighLight(RowID,strColor)
		DefaultRowColor = RowID.bgcolor
		RowID.bgcolor = strColor
	End sub	
'---------------------------------------------------------------------------------------------------------------------		
	sub NoHighLight(RowID)
		RowID.bgcolor = DefaultRowColor 
	End sub	
'---------------------------------------------------------------------------------------------------------------------
	sub ShowObjects(ID1,ID2,ID3,ID4,ID5,ID6,ID7,ID8,ID9,ID10)
		ID1.style.display = ""
		ID2.style.display = ""
		ID3.style.display = ""
		ID4.style.display = ""
		ID5.style.display = ""
		ID6.style.display = ""
		ID7.style.display = ""
		ID8.style.display = ""
		ID9.style.display = ""
		ID10.style.display = ""
	end sub
'---------------------------------------------------------------------------------------------------------------------	
	sub HideObjects(ID1,ID2,ID3,ID4,ID5,ID6,ID7,ID8,ID9,ID10)
		ID1.style.display = "none"
		ID2.style.display = "none"
		ID3.style.display = "none"
		ID4.style.display = "none"
		ID5.style.display = "none"
		ID6.style.display = "none"
		ID7.style.display = "none"
		ID8.style.display = "none"
		ID9.style.display = "none"
		ID10.style.display = "none"
	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
'---------------------------------------------------------------------------------------------------------------------
	Sub ApplyCursor()
		window.document.body.style.cursor="Cursor/MBM.cur"
	End Sub

