﻿function GetStartPage ()
{
   // window.history.length = 1;
    location.href="default.aspx";
//    location.replace("ajax.aspx");
    
}
    function EmailSendError (Message)
    {
        alert(Message);
    }
//    function RequestSubPage(sid)
//    {
//        parent.$get('UpdateProgressLoad').style.display = "none";
//        parent.$get('UpdateProgressLoad').style.display = "inline";
//      

//        PageMethods.ChangeSubValue(sid, OnSucceeded, OnFail);
//    }
//    
//    function RequestPage(id)
//    {
//        $get('UpdateProgressLoad').style.display = "none";
//        $get('UpdateProgressLoad').style.display = "inline";
//        PageMethods.ChangeValue(id, OnSucceeded, OnFail);
//    }
    
    function OnSucceeded(result, userContext, methodName)
    {
        parent.$get('ctl00_UpdateProgressLoad').style.display = "none";
        parent.document.getElementById('DivAjax').innerHTML = "<span class='Adirection DivSpanAjax'>"+result+"</span>";
     //  $get('ctl00_CPH_PanelDefault').style.display = "none";
    }
    
    function OnFail (error,userContext, methodName)
    {
         $get('ctl00_UpdateProgressLoad').style.display = "none";
        //$get('Label1').innerHTML = error;
    }
    
    
    
    function IframeBox(href, width, height, borderStyle)
    {
//      var href = an.href;
      var boxdiv = document.getElementById('script');

//      if (boxdiv != null) {
//        if (boxdiv.style.display=='none') {
//          move_box(an, boxdiv);
//          boxdiv.style.display='block';
//        } else
//          boxdiv.style.display='none';
//        return false;
//      }

//      boxdiv = document.createElement('div');
//      boxdiv.setAttribute('id', href);
//      boxdiv.style.display = 'block';
//      boxdiv.style.position = 'absolute';
//      boxdiv.style.width = width + 'px';
//      boxdiv.style.height = height + 'px';
//      boxdiv.style.border = borderStyle;
//      boxdiv.style.backgroundColor = '#fff';

      var contents = document.createElement('iframe');
      contents.id= 'FlashNews';
      contents.scrolling = 'no';
      contents.frameBorder = '0';
      contents.style.width = width + 'px';
      contents.style.height = height + 'px';
      contents.style.border = borderStyle;
      contents.src = href;

      boxdiv.appendChild(contents);
     //document.body.appendChild(boxdiv);
      
}

    function ShokWave_Generation ()
    {
       var randomID=Math.floor(Math.random()*10000)
       var so = new SWFObject("NewsGenerator.swf?"+randomID,randomID, "675", "220");
       so.useExpressInstall('expressinstall.swf');
       so.addParam("quality", "high");
       so.addParam("wmode", "transparent");
       so.addParam("menu", "false");
       so.write("script");

    }
    
    function OpenBlankWindow (url)
    {
        window.open(url,"newWindow");
    }
