﻿function regWebPageLog(TrackingCode, RefererURL, RefererPosition) {
    var strTrackingCode = '';
    var strRefererURL = '';
    var strRefererPosition = '';
    if ((typeof (TrackingCode) == 'undefined')  || (TrackingCode == '' )) {
        strTrackingCode = 'NULL';
    } else {
        strTrackingCode = TrackingCode;
    }
    if ((typeof (RefererURL) == 'undefined') ||(RefererURL == '' )){
        strRefererURL = 'NULL';
    } else {
        strRefererURL = RefererURL;
    }
    if ((typeof (RefererPosition) == 'undefined') || (RefererPosition == '' )) {
        strRefererPosition = 'NULL';
    } else {
        strRefererPosition = RefererPosition;
    }
    //alert(strRefererURL);
        
    $.getJSON(
			    'http://core.hionegame.com/log/log_web_core_proc.asp?jsoncallback=?'
			    , {
			        CurFullUrl: document.URL
                    , CurUrlProtocol: document.location.protocol
                    , CurHostName: document.location.host
					, CurPathName: document.location.pathname
                    , CurUrlPort: document.location.port
                    , CurQueryStr: document.location.search
                    , TrackingCode: strTrackingCode
                    , RefUrl: strRefererURL
                    , RefPosition: strRefererPosition
			    }
			   , function (data) {
			       $("").html(data);
			   }
    );
}

/*       
        function regWebPageLog(TrackingCode,RefererURL,RefererPosition) {
        	var strTrackingCode = '';
        	var strRefererURL = '';
        	var strRefererPosition = '';
        	if (typeof(TrackingCode) == 'undefined') {
        			strTrackingCode='NULL';
        	} else {
        			strTrackingCode=TrackingCode;	
			}
			
        	if (typeof(RefererURL) == 'undefined') {
        			strRefererURL='NULL';
        	} else {
					strRefererURL=RefererURL;	        				
			}			
        	if (typeof(RefererPosition) == 'undefined') {
        			strRefererPosition='NULL';
        	} else {
					strRefererPosition=RefererURL;	        				
			}						
            $.post(
			    'http://core.hionegame.com/log/log_web_core_proc.asp',
			    {
                     CurFullUrl: document.URL
                    , CurUrlProtocol: document.location.protocol                     
                    , CurHostName: document.location.host                    
					, CurPathName: document.location.pathname										                                        
                    , CurUrlPort: document.location.port
                    , CurQueryStr: document.location.search                                        
                    , TrackingCode : strTrackingCode
                    , RefUrl : strRefererURL
                    , RefPosition : strRefererPosition
                    
                 },
			   		function (data) {
			   			 	// $("#el_resultPlace").html(data); 
			   			 	 $("").html(data); 
			   			 	
			   		} 			   
            )
        }
*/
