var objTrcakRequest;  
    function trcakCatReq(clickedOn)
    {
       
        var trackWindowType="windows";
		
		var serUrl ='/servlet/CategoryMonitor?clickedOn='+clickedOn+'&pageType=HomePage';
        //alert("serUrl value :->"+serUrl)   
        
        if(window.ActiveXObject)
        {
            objTrcakRequest = new ActiveXObject('Microsoft.XMLHTTP');
            //alert("Windos Browser");
        }
        else
        {
            objTrcakRequest = new XMLHttpRequest();
            trackWindowType = "nonWindows";
        }
        if(objTrcakRequest)
        {
            //alert("objAddRequest 1");
            objTrcakRequest.onreadystatechange = sendTrackCatInfo;
            //alert("objAddRequest 2");
            objTrcakRequest.open('Get',serUrl,true);
            //alert("objAddRequest 3");
            objTrcakRequest.send('');           
        }
    }
    function sendTrackCatInfo()
    {   
        
        //alert('object state :-> '+objAddRequest.readyState)
        if(objTrcakRequest.readyState==4)
        {
            //alert('object status :-> '+objAddRequest.status)
            if(objTrcakRequest.status==200)
            {
               //alert('200');
            }
        }
    }
    
    
    
    

///////******** Tracking Click on Categary End *******////////////			
					
					
	
    var objAddRequest;
    var clientUrl;
	var setWindow;
    
    
    function addSense(advUrl,imageId)
    {      

		serUrl ='/servlet/AddSense?imageID='+imageId+'&pageType=Home';
        clientUrl = advUrl;   
        //alert("clientUrl value :->"+clientUrl) 
		//alert("serUrl value :->"+serUrl)   
        setWindow = imageId;
	if(advUrl=='dgmTP'){
		setWindow = 'dgmTP';
	}
        if(window.ActiveXObject)
        {
            objAddRequest = new ActiveXObject('Microsoft.XMLHTTP');
            //alert("Windos Browser");
        }
        else
        {
            objAddRequest = new XMLHttpRequest();
            mWindow = "nonWindows";
        }
        if(objAddRequest)
        {
            //alert("objAddRequest 1");
            objAddRequest.onreadystatechange = sendInfo;
            //alert("objAddRequest 2");
            objAddRequest.open('Get',serUrl,true);
            //alert("objAddRequest 3");
             objAddRequest.send('');
           
        }
    }
    function sendInfo()
    {   
        
        //alert('object state :-> '+objAddRequest.readyState)
        if(objAddRequest.readyState==4)
        {
            //alert('object status :-> '+objAddRequest.status)
            if(objAddRequest.status==200)
            {
               // alert.href("clientUrl "+clientUrl);
                //window.open(clientUrl,"");
			//var caseValue;
			switch (setWindow)
			{
				case "Right_add100":
				window.open(clientUrl,'W2Stay','scrollbars=yes,resizable=no');
				break;
				case "PlanATrip":
				//window.open(clientUrl,'PlanATrip','width=725,height=495,left=200,top=175,scrollbars=yes,resizable=yes');
				window.location.href;
				break;
				case "MyTrip":
				window.open(clientUrl,'MyTrip','width=725,height=495,left=133,top=185,screenX=0,screenY=0,scrollbars=no,resizable=no');
				break;
				case "HowToReach":
				//window.open(clientUrl,'HowToReach','width=410,height=490,left=305,top=180,screenX=0,screenY=0,scrollbars=no,resizable=no');
				window.location.href;
				break;
				case "Accomodation":
//window.open(clientUrl,'HowToReach','width=410,height=490,left=305,top=180,screenX=0,screenY=0,scrollbars=no,resizable=no');
				window.location.href;
				break;
				case "Festival":
				window.open(clientUrl,'Festival','width=600,height=462,left=200,top=175,screenX=0,screenY=0,scrollbars=no,resizable=no');
				//window.location.replace(clientUrl);
				break;
				case "TravelTips":
				window.open(clientUrl,'TravelTips','width=770,height=650,left=200,top=175,screenX=0,screenY=0,scrollbars=yes,resizable=no');
				break;
				case "Guidepost":
				window.open(clientUrl,'Guidepost','width=792,height=475,left=130,top=75,screenX=0,screenY=0,scrollbars=yes,resizable=no');
				break;
				case "NewsMedia":
				window.open(clientUrl,'NewsMedia','width=480,height=400,left=120,top=140,screenX=0,screenY=0,scrollbars=no,resizable=no,statusbar=no');
				break;
				case "Advertisment":
				window.open(clientUrl,'Advertisment','width=767,height=550,left=215,top=80,screenX=0,screenY=0,scrollbars=yes,resizable=no');
				break;
				case "PressRelease":
				//window.open(clientUrl,'PressRelease','width=725,height=495,left=200,top=175,scrollbars=yes,resizable=yes');
				window.location.href;
				break;
				case "Weather":
				window.open(clientUrl,'Weather','width=580,height=543,left=215,top=135,screenX=0,screenY=0,scrollbars=no,resizable=no');
				break;
				case "GuestBook":
				window.open(clientUrl,'GuestBook','width=800,height=650,left=50,top=25,screenX=0,screenY=0,scrollbars=yes,resizable=no');
				break;
				
				case "GuestInfoLeft":
//window.open(clientUrl,'GuestInfoLeft','width=700,height=650,left=50,top=25,screenX=0,screenY=0,scrollbars=yes,resizable=no');
				window.location.replace(clientUrl);
				break;
				case "AboutVisitindia":
				window.open(clientUrl,'AboutVisitindia','width=700,height=472,left=155,top=140,screenX=0,screenY=0,scrollbars=no,resizable=no');
				break;
				case "CurrencyCal":
				window.open(clientUrl,'CurrencyCal','width=550,height=302,left=220,top=195,screenX=0,screenY=0,scrollbars=no,resizable=no');
				break;
				case "Helpline":
				window.open(clientUrl,'Helpline','width=600,height=430,left=165,top=145,screenX=0,screenY=0,scrollbars=no,resizable=no');
				break;
				case "AboutVisitindia":
				window.open(clientUrl,'AboutVisitindia','width=800,height=650,left=50,top=25,screenX=0,screenY=0,scrollbars=yes,resizable=no');
				break;	
				case "PhoneDirectory":
				window.open(clientUrl,'PhoneDirectory','width=635,height=698,left=265,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=no');
				break;
				case "MoneyCounter":
				window.open(clientUrl,'MoneyCounter','width=400,height=409,left=570,top=50,screenX=0,screenY=0,scrollbars=no,resizable=no');
				break;
				case "OnlineShopping":
//window.open(clientUrl,'OnlineShopping','scrollbars=yes,resizable=yes');
				window.location.href;
				break;
				case "KidZone":
//window.open(clientUrl,'KidZone','scrollbars=yes,resizable=yes');
				window.location.href;
				break;
				case "Blog":
//window.open(clientUrl,'Blog','width=1015,height=750,left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=yes');
				window.location.href;
				break;
				case "Classifieds":
//window.open(clientUrl,'Classifieds','width=1015,height=750,left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=yes');
				window.location.href;
				break;
				case "Contest":
			window.open(clientUrl,'Contest','width=400,height=200,left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=yes');
				break;
				case "HolidayPackage":
//window.open(clientUrl,'HolidayPackage','width=700,height=800,left=200,top=175,screenX=0,screenY=0,scrollbars=yes,resizable=no');
				window.location.href;
				break;
				case "WebVideo":
//window.open(clientUrl,'WebVideo','width=1015,height=750,left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=yes');
				window.location.href;
				break;
case "PhotoGallery":
//window.open(clientUrl,'PhotoGallery','width=1015,height=750,left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=yes');
				window.location.href;
				break;
				case "Recipe":
				window.location.href;			//window.open(clientUrl,'Recipe','width=1015,height=750,left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=yes');
				break;
				case "SiteMap":
				window.location.href;			
				break;
                case "Poll":
			window.open(clientUrl,'Poll','width=400,height=315,left=260,top=200,screenX=0,screenY=0,scrollbars=no,resizable=no');
				break;  
				case "180":
				window.open(clientUrl,'180','scrollbars=yes,resizable=yes');
				break;
				case "225":
				window.open(clientUrl,'OnlineShopping','scrollbars=yes,resizable=yes');
				break;
				case "226":
				window.open(clientUrl,'OnlineShopping','scrollbars=yes,resizable=yes');
				break;
				case "227":
				window.open(clientUrl,'PlanATrip','scrollbars=yes,resizable=yes');
				break;
				case "228":
				window.open(clientUrl,'PlanATrip','scrollbars=yes,resizable=yes');
				break;
				case "29":
				window.open(clientUrl,'ContactUs','width=517,height=600,screenX=0,screenY=0,left=380,top=80,scrollbars=yes,resizable=no');
				break;
				case "30":
				window.open(clientUrl,'ContactUs','width=517,height=600,screenX=0,screenY=0,left=380,top=80,scrollbars=yes,resizable=no');
				break;
				case "199":
				window.open(clientUrl,'ContactUs','width=517,height=600,screenX=0,screenY=0,left=380,top=80,scrollbars=yes,resizable=no');
				break;
				case "222":
				window.open(clientUrl,'ContactUs','width=517,height=600,screenX=0,screenY=0,left=380,top=80,scrollbars=yes,resizable=no');
				break;
				case "dgmTP":
					setWindow='';
					//do nothing
					break;
				/*case "Blog":
					window.open(clientUrl,'Blog','width=1015,height=750,left=0,top=0,screenX=0,screenY=0,scrollbars=yes,resizable=yes');
					break;
					*/
				default :
				window.open(clientUrl,"");
			}
		}
      }
    }
    

		
