function PV_GetCookie(sName)
{
    var aCookie = document.cookie.split( "; " );
    for ( var i=0; i < aCookie.length; i++ )
    {
        var aCrumb = aCookie[i].split( "=" );
        if ( sName == aCrumb[0] )
            return aCrumb[1];
    }
    return null;
}

function PV_Record()
{
    var uvCookie = PV_GetCookie( "MYM_UVID" );
    var n = new Date().getTime();
    var c = escape( n * 1000 + Math.round( Math.random() * 1000 ));
    if( uvCookie == null )
    {
        uvCookie = c;
        document.cookie = "MYM_UVID=" + uvCookie + ";path=/;expires=Sun, 29 July 2046 00:00:00 UTC;domain=.mymhotel.com;";
    }
    document.write( "<img src=\"http://pv.mymhotel.com/pv.gif" + 
                    "?t?=" + c +
                    "?s?=2" +
                    "?u?=" + uvCookie + 
                    "?w?=" + window.screen.width + "*" + window.screen.height +
                    "?p?=" + escape( self.location ) +
                    "?r?=" + escape( document.referrer ) + "\" width=0 height=0 border=0>" );
}

var PV_Flag;
if ( !PV_Flag ) PV_Record();
PV_Flag = 1;

