
  function CheckFrame(targetContent) {


   if (parent.location.href == window.location.href) {

      document.cookie = "reload_content="+targetContent;
      window.location.href = 'index.html';

   } else {

      var c = document.cookie;
      var n = window.name;
      var url;

      if(n == "content") {
          document.cookie = "reload_content=";
          url = c.match(/reload_content=([^;]+)/);

      } 


if(url != null && url.length != 0) {
          window.location.href = url[1];
	  return false;
      }
   }
 }
