'File Name	: Common.vbs
'Created by	: Gokulakrishnan Nagarajan
'Date		: 06/09/2005
'Pupose		: This file will have all the common VB Script functions.

Function VbScriptYesNoConfirmationDialog(message,title)
'This function should be used for getting conformation from the users in Yes/No dialog box.
'The message should be sent as a parameter and this function will return true if user clicked yes and false if user clicked no.
'This true/false return value can be obtained in the calling javascript function.
'USAGE:(Javascript code)
'		var deleteConformation;
'		deleteConformation  = VbScriptYesNoConfirmationDialog("Your confirmation string goes here..","Your Title Goes here");
'		if (deleteConformation == 'true')
'		{
'			if the user had clicked YES
'		}
'		else if (deleteConformation == 'false')
'			return false;
		VbScriptYesNoConfirmationDialog = MsgBox (message,4,title)
		if VbScriptYesNoConfirmationDialog = "6" then VbScriptYesNoConfirmationDialog = "true"
		if VbScriptYesNoConfirmationDialog = "7" then VbScriptYesNoConfirmationDialog = "false"
End Function
Function SetControlFocus()
	document.Form1.txtSupplierEmail.Focus
End Function
Function VbScriptOkDialog(message, title)

	VbScriptOkDialog = MsgBox (message,vbOKOnly,title)
	
	if VbScriptOkDialog = 1 then 
		VbScriptOkDialog = "true"
	else
		VbScriptOkDialog = "false"
	end if	
End Function