//Source of the user



var strSource;
// var NormalString =/^[^\;\'\[\]\(\)\&\?\!\%\<\>\"\&\=]+$/;
var NormalString =/^[^\;\'\[\]\(\)\!\<\>\"]+$/;

//alert(escape(document.location.href))
strSource= document.location.href;


if (strSource.indexOf("#") > 0)
{
	strSource = strSource.substring(0, strSource.indexOf("#"));
}




if(strSource.indexOf("?") >0)
	    
{		
      strSource = strSource.substring(strSource.indexOf("?"), strSource.length);
	  if((strSource.indexOf("source")>0)||(strSource.indexOf("type")>0))

        {
            
               if (strSource.indexOf("merchant") <= 0)
			   {
          
               strSource = strSource +"&merchant=citi";
			
               }
    
           }       		
         
}

else
{
strSource="?merchant=citi";
}


isProper(unescape(strSource))



function fnSubmit(strPath){



	if (strSource != '') 

	{

		if (strPath.indexOf("#") > 0) 

		{

		//document.location.href=  strPath + strSource;

		strSource=strSource+'#';

		document.location.href=  strPath.replace('#',strSource);

		strNavPromo=strSource;

		}

		else

		{		

			document.location.href= strPath +  strSource;		

		}

	}

	else

	{

		document.location.href= strPath;

		strNavPromo='';

	}



}	



	

function isProper(objectToCheck) 
	{	
		
		var obj = objectToCheck;
		var string=obj;
		if (string!='' || string.length!=0)
		{
			if (NormalString.test(string))
				return true;
			else
				{
					//return false;
					document.location.href = '/uk/errorpage/'
				}
		}
		return true;
	}	
	

///- END 