/************************************************************
 * File Name: Common.js		
 * Description/Purpose:	Has the client side javascript functions
 *						common to the site
 * Modification Log
 * Ver.No	Date		Author		Modification
 * ----------------------------------------------------------
 * 1.0		22-Mar-2004	Infosys		Original Version
 * 2.0		14-Oct-2006	Pfaffj		Moved google functions to common
 * ----------------------------------------------------------
*************************************************************/

//method to shift focus from source object to target object

function shiftFocusTo(objFrom,objTo) 
{ 
	var test = new String(objFrom.value);
	//var evt= window.event;
	//var key = evt.keyCode;
	//if((key >= 48 && key <= 57) || (key >= 96 && key <= 105))
	//{
		if (test.length > 2)
		{ 
			objTo.focus();
		}
	//}
}

//This function is used to swap images
function ImgSwap(imageObject,image,status)
{
	var i = new Image();
	i.src = image + status + ".gif" ;
	document.all[imageObject].src =i.src ;
}

//to set the focus in the obhect specified
function GetFocus(obj)
{
	//document.all[obj].focus();
	if(navigator.appName=="Netscape") 
    {
		
        document.forms[0].elements[obj].focus();
    } 
    else
    {
		document.all[obj].focus();
	}
}

function GoogleCheckoutInfo()
{
	if(navigator.appName=="Netscape") 
	{
		var objWin = window.open('/GoogleCheckoutInfo.aspx','google_checkout_info','width=700,height=490,resizable=yes, toolbar=no');
		objWin.window.focus();
	}
	else
	{
		var objWin = window.open('/GoogleCheckoutInfo.aspx','google_checkout_info','width=450,height=490,resizable=yes, toolbar=no');
		objWin.window.focus();
	}
}	
function WhatIsGoogleCheckout()
{
	if(navigator.appName=="Netscape") 
	{
		var objWin = window.open('/WhatIsGoogleCheckout.aspx','about_google_checkout','width=790,height=530,resizable=yes, toolbar=no, scrollbars=yes');
		objWin.window.focus();
	}
	else
	{
		var objWin = window.open('/WhatIsGoogleCheckout.aspx','about_google_checkout','width=790,height=580,resizable=yes, toolbar=no, scrollbars=yes');
		objWin.window.focus();
	}
}			

function WhatIsAmazonPayments()
{
	if(navigator.appName=="Netscape") 
	{
		var objWin = window.open('/WhatIsAmazonPayments.aspx','about_amazon_payments','width=790,height=530,resizable=yes, toolbar=no, scrollbars=yes');
		objWin.window.focus();
	}
	else
	{
		var objWin = window.open('/WhatIsAmazonPayments.aspx','about_amazon_payments','width=790,height=530,resizable=yes, toolbar=no, scrollbars=yes');
		objWin.window.focus();
	}
}

function WhatIsPaypal()
{
	if(navigator.appName=="Netscape") 
	{
		var objWin = window.open('/WhatIsPaypal.aspx','about_paypal','width=560,height=480,resizable=yes, toolbar=no, scrollbars=yes');
		objWin.window.focus();
	}
	else
	{
		var objWin = window.open('/WhatIsPaypal.aspx','about_paypal','width=560,height=480,resizable=yes, toolbar=no, scrollbars=yes');
		objWin.window.focus();
	}
}	

function WhatIsPayments()
{
	if(navigator.appName=="Netscape") 
	{
		var objWin = window.open('/WhatIsPayments.aspx','about_payments','width=790,height=530,resizable=yes, toolbar=no, scrollbars=yes');
		objWin.window.focus();
	}
	else
	{
		var objWin = window.open('/WhatIsPayments.aspx','about_payments','width=790,height=530,resizable=yes, toolbar=no, scrollbars=yes');
		objWin.window.focus();
	}
}			