
function jumpToAnchor(anc) {

   window.location = String(window.location).replace(/\#.*$/, "") + "#"+ anc;
 }


function home1()
{
  //alert( top.phone1.ifrm1) ;

  if (typeof top.phone1.ifrm1 == 'undefined') // Any scope
  {
    //window.frames['phone1'].src='/php2/s1_main.php?run=mn8_div1';
    var src1 ='/php2/s1_main.php?run=mn8_div1';
    document.getElementById('phone1').src = src1;
    exit;
  }


  //top.phone1.toggle3() ;

  var  len= top.phone1.ifrm1.length 
  //alert(len) ;
  
  for ( var i=0 ; i<len ; ++i )
  {
    ar1 =  top.phone1.ifrm1[i] ; 

    window.frames['phone1'].document.getElementById( ar1).style.display= 'none';
    //document.write(ifrm[i] + 'zddzz<br>' ) ; 
  }    

  window.frames['phone1'].document.getElementById('base1').style.display= 'block';

}
  
 


 

  // this is used witrhi n the frame programs 
  function toggle2(pageon,pageoff)
  {

    parent.document.getElementById('base1').style.display= 'none';
    parent.document.getElementById('add5').style.display= 'none';

    parent.document.getElementById('cal5').style.display= 'none';
    parent.document.getElementById('wal5').style.display= 'none';
    parent.document.getElementById('new5').style.display= 'none';
    var mnu9 = parent.document.getElementById( pageon );

    mnu9.style.display = 'block' ;
  } 
  
  



function wall_send(u_Key,title)
{

  //var cookie1 = getCookie('u_Key') ; 
  //if ( cookie1 == "" ||  cookie1 == null ) 
  //{ top.location.href='/php2/index.htm' ;
  //  return;}
    
  var wd_Link ;
  wd_Link='/php2/s1_main.php?run=wa30_send&mg_ToKey='+u_Key+'&mg_Title='+title+'&include=wall/wa30_send' ;

  wd_Link='/php2/s2_main.php?run=mg31_send&u_Index='+u_Key+'&mg_Title='+title+'&return=close&include=message/mg31_send';
     
  var winName1;
  if (winName1) //check for null
    win_name1++ ; //increment
  else 
    win_name1 = 0; //initialize if null

  winx = 'width=500,height=450,left=200,top=200,toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';
  winName1=window.open(wd_Link,'wall1',winx);
  winName1.focus();
  
}
function wall_reply(wa_Index)
{

  var wd_Link ;
  wd_Link='/php2/s2_main.php?run=wa2_reply&wa_Index='+wa_Index+'&return=close&include=wall/wa2_edit';

  winx = 'width=500,height=450,left=200,top=200,toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';
  winName1=window.open(wd_Link,'wall1',winx);
  winName1.focus();
  
}




function wall5(wa_Index)
{
 
  var cookie1 = getCookie('u_Key') ; 
   //alert(cookie1) ;

  var winName;
  
  ///winName = window.open(targetURL, targetURLTitle, windowProperties) 

  if (winName) //check for null
    winName++ ; //increment
  else 
    winName = 0; //initialize if null
  
  
  // alert(str) ;

  //  current page
  str  = top.location.href ;

  loc1 = str.indexOf("?") ;

  if( loc1 > 0 )
    str.substring(0,loc1) ;

  //alert(str) ;
  if ( cookie1 == "" ||  cookie1 == null ) 
  {
    location.href='/php2/index.php' ;   

  } else {  

    winx = 'width=340,height=400,left=200,top=200,toolbar=no,scrollbars=no,location=no,status=no,resizable,menubar=no';
    wd_Link='/php2/s1_main.php?run=wa2_new&wa_Index='+wa_Index+'&return=close&include=wall/wa2_edit&page='+ str ;

    winName=window.open(wd_Link,winName,winx);
    winName.focus();
  }
  
}




function go3()
{
  if( log1.substr(0,6) == 'Logout' )
  {

    document.cookie ='u_Key=yyy; expires=Fri, 3 Aug 2001 20:47:11 UTC; path=/' ;
    document.cookie ='u_Nick=yyy; expires=Fri, 3 Aug 2001 20:47:11 UTC; path=/' ;

    main99.location.href('/php2/user/u7_logout.php') ;

    window.location.reload();  

  } else {

    wd_Link = '/php2/s1_main.php?run=u5_login&event=reload&include=user/u5_login&page=small'  ;

    leftx =top.screenLeft +100 ;
    topx  =top.screenTop  +100 ;

    winx = 'width=450,height=300,left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no' ;

    login=window.open(wd_Link,'login',winx);
    login.focus();

  }
}   



function go1()
{
  if( log1.substr(0,6) == 'Logout' )
  {

    location.href= '/php2/login.php?logout=y'  ; 

    //document.cookie ='u_Key=yyy; expires=Fri, 3 Aug 2001 20:47:11 UTC; path=/' ;
    //document.cookie ='u_Nick=yyy; expires=Fri, 3 Aug 2001 20:47:11 UTC; path=/' ;

   // main99.location.href='/php2/user/u7_logout.php' ;

   //    window.location.reload();  

    //alert('fred') ; 
    //document.getElementById('u_Nick2').innerHTML = 'Fred Flinstone';

  } else {

    location.href= '/php2/s2_main.php?run=u39_page&include=user/u39_page'  ;
    
    //leftx =top.screenLeft +100 ;
    //topx  =top.screenTop  +100 ;

    //winx = 'width=450,height=300,left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no' ;

    //login=window.open(wd_Link,'login',winx);
    //login.focus();

  }

}   

function getCookie(c_name)
{
  if (document.cookie.length>0)
  {
    c_start=document.cookie.indexOf(c_name + "=");

    if (c_start!=-1)
    {
      c_start=c_start + c_name.length+1;

      c_end=document.cookie.indexOf(";",c_start);

      if (c_end==-1) c_end=document.cookie.length;

      //alert(document.cookie) ;
      //alert(document.cookie.substring(c_start,c_end)) ;

      return unescape(document.cookie.substring(c_start,c_end));
    }
  }
  return "";
}



function jump(URL)
{
 var NURL = new String( window.location.href + "#" + URL);
 var NURL = new String( "#" + URL);
 var NURL = new String( "#education");

 alert(NURL) ;

 self.location.href = NURL;
}


function loadedit10(wd_Link,link10)
{
  leftx =top.screenLeft +100 ;
  topx  =top.screenTop  +100;
  lm_wide=700 ;
  lm_high=400 ;
    
  winx = 'width='+lm_wide+',height='+lm_high+',left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';

  // alert(winx);
  edit1=window.open(wd_Link,link10,winx);

  edit1.focus();
}


function cookieVal(cookieName)
{
	thisCookie = document.cookie.split("; ")
  for (i=0; i<thisCookie.length; i++) 
  {
    if (cookieName == thisCookie[i].split("=")[0])
    {
      str1 = thisCookie[i].split("=")[1]
      str1 = str1.replace('+',' ')
     	return str1
    }
  }	
	return 'User Login'
}


function doSel(obj)
{ 
  for (i = 1; i < obj.length; i++)
   if (obj[i].selected == true)
      eval(obj[i].value);
}

function doSel1(obj)
{ 
  alert('ggggggggggg');
  
  for ( i = 1; i < obj.length; i++)
    alert( 'ffffffff=' + obj[i].value ) ;

}

function doSel2(obj)
{ 
  for (i = 1; i < obj.length ; i++)
  { if (obj[i].selected == true)
      top.main1.location.href=obj[i].value ;
  }   
}


function reload_main()
{
  window.opener.history.go(0) ;     
  self.close() ;
}



function loadpage1(wd_Link)
{ leftx =top.screenLeft +100 ;
  topx  =top.screenTop  +100;

  winx = 'width=800,height=600,left='+leftx+',top='+topx+',toolbar,scrollbars,location,resizable,menubar';

  // alert(winx);
  moas1=window.open(wd_Link,'moas1',winx);
  moas1.focus();
}


function mobile()
{ leftx =top.screenLeft +100 ;
  topx  =top.screenTop  +100;

  wd_Link = '/php2/mobile/index.htm' ;
  
  winx = 'width=320,height=480,left='+leftx+',top='+topx+',toolbar,scrollbars,location,resizable,menubar';

  // alert(winx);
  mobile=window.open(wd_Link,'mobile',winx);
  mobile.focus();
}


function loadedit1(wd_Link,lm_wide,lm_high)
{
 if(lm_wide =='email_send')
  { lm_wide=700 ;
    lm_high=350 ;
  }
  if(lm_wide =='email_edit')
  { lm_wide=700 ;
    lm_high=600 ;
  }
  if(lm_wide =='email_select')
  { lm_wide=500 ;
    lm_high=300 ;
  }

  if(lm_wide =='web_edit')
  { lm_wide=500 ;
    lm_high=300 ;
  }
  if(lm_wide =='web_select')
  { lm_wide=600 ;
    lm_high=300 ;
  }

  if(lm_wide =='ct_edit')
  { lm_wide=500 ;
    lm_high=400 ;
  }
  if(lm_wide =='ct_select')
  { lm_wide=400 ;
    lm_high=300 ;
  }

  if(lm_wide =='address_edit')
  { lm_wide=700 ;
    lm_high=400 ;
  }
  if(lm_wide =='address_select')
  { lm_wide=600 ;
    lm_high=300 ;
  }
  if(lm_wide =='forum1')
  { lm_wide=700 ;
    lm_high=400 ;
  }


  // email 
  if(lm_wide == '750' &&  lm_high=='600' )
  { lm_wide=500 ;
    lm_high=500 ;
  }


  leftx =top.screenLeft +50 ;
  topx  =top.screenTop  +50;

  winx = 'width='+lm_wide+',height='+lm_high+',left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';

  // alert(winx);
  edit1=window.open(wd_Link,'edit1',winx);

  edit1.focus();
}

function loadedit2(wd_Link,lm_wide,lm_high)
{
 
  leftx =top.screenLeft +100 ;
  topx  =top.screenTop  +100;

  winx = 'width='+lm_wide+',height='+lm_high+',left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';

  // alert(winx);
  edit2=window.open(wd_Link,'edit2',winx);
  edit2.focus();
}
function loadedit2a(wd_Link,lm_wide,lm_high)
{
 
  leftx = +100 ;
  topx  = +100 ;

  winx = 'width='+lm_wide+',height='+lm_high+',left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';

  // alert(winx);
  edit2=window.open(wd_Link,'edit2',winx);
  edit2.focus();
}
             
            

function loadedit3(wd_Link,lm_wide,lm_high)
{
 
  leftx =top.screenLeft +10 ;
  topx  =top.screenTop  +10;
  winx = 'width='+lm_wide+',height='+lm_high+',left='+leftx+',top='+topx+',toolbar=no,scrollbars=no,location=no,status=yes,resizable,menubar=no';
  // alert(winx);
  user1=window.open(wd_Link,'user1',winx);
  user1.focus();
}

function loadforum(wd_Link)
{ leftx =top.screenLeft +50 ;
  topx  =top.screenTop  +50;

  winx = 'width=800,height=500,left='+leftx+',top='+topx+',toolbar,scrollbars,location,status,resizable,menubar';

  // alert(winx);
  forum1=window.open(wd_Link,'forum1',winx);
  forum1.focus();
}



function loadmail(wd_Link)
{ leftx =top.screenLeft +100 ;
  topx  =top.screenTop  +100;

  winx = 'width=500,height=300,left='+leftx+',top='+topx+',toolbar,scrollbars,location,status,resizable,menubar';

  // alert(winx);
  mail1=window.open(wd_Link,'mail1',winx);
  mail1.focus();
}

function loaduser(wd_Link)
{ leftx =top.screenLeft +100 ;
  topx  =top.screenTop  +100;

  winx = 'width=400,height=200,left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';

  // alert(winx);
  loaduser = window.open(wd_Link,'loaduser',winx);
  loaduser.focus();
}

function loadloan(wd_Link)
{ leftx =top.screenLeft +100 ;
  topx  =top.screenTop  +100;

  winx = 'width=750,height=500,left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';

  // alert(winx);
  loaduser = window.open(wd_Link,'loadloan',winx);
  loaduser.focus();
}

function myClose()
{ self.close(); } 


function loadpageht(wd_Link)
{ leftx =top.screenLeft +200 ;
  topx  =top.screenTop   +0;

  winx = 'width=700,height=500,left='+leftx+',top='+topx+',status=no,scrollbars=yes,titlebar=yes,resizable=yes,toolbar=no,menubar=no';

  loadht=window.open(wd_Link,'loadht',winx);
  loadht.focus(); 
}



function loadedit99(name99,wd_Link,lm_wide,lm_high)
{
 if(lm_wide =='email_send')
  { lm_wide=700 ;
    lm_high=350 ;
  }
  if(lm_wide =='email_edit')
  { lm_wide=700 ;
    lm_high=600 ;
  }
  if(lm_wide =='email_select')
  { lm_wide=500 ;
    lm_high=300 ;
  }

  if(lm_wide =='web_edit')
  { lm_wide=500 ;
    lm_high=300 ;
  }
  if(lm_wide =='web_select')
  { lm_wide=600 ;
    lm_high=300 ;
  }

  if(lm_wide =='ct_edit')
  { lm_wide=500 ;
    lm_high=400 ;
  }
  if(lm_wide =='ct_select')
  { lm_wide=400 ;
    lm_high=300 ;
  }


  if(lm_wide =='address_edit')
  { lm_wide=700 ;
    lm_high=400 ;
  }
  if(lm_wide =='address_select')
  { lm_wide=600 ;
    lm_high=300 ;
  }
  if(lm_wide =='forum1')
  { lm_wide=700 ;
    lm_high=400 ;
  }

  leftx =top.screenLeft +100 ;
  topx  =top.screenTop  +100;

  winx = 'width='+lm_wide+',height='+lm_high+',left='+leftx+',top='+topx+',toolbar=no,scrollbars,location=no,status=no,resizable,menubar=no';

  // alert(winx);
  name99w=window.open(wd_Link,name99,winx);

  name99w.focus();
}
