function redirectPage()
{
	/*
	//Uncomment in production environment
	if(window.location.href.indexOf("https://") == -1 & window.location.href.indexOf("localhost") == -1)
	{
		window.location.href = "https://www.us-visaservices.com/korea/securedefault.htm";
	}
	*/
}

function Schedule(confirmationMsg)
		{
		
			if(confirmationMsg != undefined)
			{
				if(!confirm(confirmationMsg))
				{
					return(false);
				}
			}
			// Disable Start GoBack ,Continue and Cancel buttons.
			window.document.body.style.cursor = "wait";
			window.document.FormMain.all.TOKEN_B00077.disabled = true;
			window.document.FormMain.all.TOKEN_B00015.disabled = true;

			// Submit form to process schedule.
			__doPostBack('TOKEN_B00015','');
		}		

function ShowHelp()
{

	var sFeatures = 'height=600,width=900,top=' + (screen.availHeight-600)/2 + ',left=' + (screen.availWidth-900)/2 + ',status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes';
	var win = window.open('Help.aspx', 'Help', sFeatures);
	win.focus();
}

function Trim(s) 
{

	// Remove leading spaces and carriage returns
		
	while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
	{
		s = s.substring(1,s.length);
	}

	// Remove trailing spaces and carriage returns

	while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
	{
		s = s.substring(0,s.length-1);
	}
	
	return s;
}

function LPad(sStr, iLen, sChr)
{

	sStr = "" + sStr;
	if (sStr.length < iLen)
		return Replicate(sChr, iLen - sStr.length) + sStr;
	return sStr;
}		

function Replicate(sStr, iLen)
{
	
	var sRet = "";
	for (var iCount = 0; iCount < iLen; iCount++)
		sRet += sStr;
	return sRet;
}		

function ShowFAQ()
{

	var sFeatures = 'height=600,width=900,top=' + (screen.availHeight-600)/2 + ',left=' + (screen.availWidth-900)/2 + ',status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes';
	var win = window.open('FAQ.aspx', 'FAQ', sFeatures);
	// win.focus();
}

function ShowINFO()
{

	var sFeatures = 'height=600,width=900,top=' + (screen.availHeight-600)/2 + ',left=' + (screen.availWidth-900)/2 + ',status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes';
	var win = window.open('Information.aspx', 'FAQ', sFeatures);
	win.focus();
}
