function RefreshParentFromCookie( parentWindow ){var url = GetCookieValue( "ParentUrl" );if ( parentWindow && url != null ){parentWindow.location.href = url;}}function WriteParentUrl( url ){var now = new Date();now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);SetCookieValue( "ParentUrl", url, now, "/" );}function SetCookieValue( name, value, expires, path, domain, secure ){document.cookie = name + "=" + escape(value) +((expires) ? "; expires=" + expires.toGMTString() : "") +((path) ? "; path=" + path : "") +((domain) ? "; domain=" + domain : "") +((secure) ? "; secure" : "");}function GetCookieValue( name ){var dc = document.cookie;var prefix = name + "=";var begin = dc.indexOf("; " + prefix);if (begin == -1){begin = dc.indexOf(prefix);if (begin != 0) return null;}else{begin += 2;}var end = document.cookie.indexOf(";", begin);if (end == -1){end = dc.length;}return unescape(dc.substring(begin + prefix.length, end));}