

function showedit()
{
 for(i = 0; i < document.all.length; i++){
	   var t=document.all(i);
	   if (t.id.substr(0,1)=='e')
	   {
	        t.style.display='';
	   };
 };
}



function hideedit()
{
 for(i = 0; i < document.all.length; i++){
   var t=document.all(i);
   if (t.id.substr(0,1)=='e')
   {
        t.style.display='none';
        t.style.left=x;
        t.style.top=y;

   };
 };
}




















var ShowLoginInfo=document.getElementById('ShowLoginInfo');
var divrunJS=document.getElementById('divrunJS');
var shadow=document.getElementById('shadow');

var tss=document.getElementById('tss');
var dss=document.getElementById('dss');
var shadowss=document.getElementById('shadowss');
var menuss=document.getElementById('menuss');

var hintshadow=document.getElementById('hintshadow');

var shadow1=document.getElementById('shadow1');
var popup=document.getElementById('popup');


var popupin=document.getElementById('popupin');
var page=document.getElementById('page');
var body=document.getElementById('body');
var mes=document.getElementById('mes');

var movespan=document.getElementById('movespan');
var moveleft=-1000;
var psflag=0
var varsstime=3;






function fShowLoginInfo()
{ 
  runJS('showlogin.htm');
}









function showall()
{
 shadow.style.display='none';
 shadow1.style.display='none';
 shadowss.style.display='none';
}














function wonmousemove(X,Y,st)
{
    if (moveleft!=0)
    {
	movespan.style.left=X+20;
	movespan.style.top=-movetop+8+Y+st;
    }
}

function getWindowSize() {
    var myWidth = 0, myHeight = 0;
    if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    return {"height":myHeight, "width":myWidth};
}




function mouseover(t)
{
 t.style.background='#ffc0ff';
}

function mouseout(t)
{
 t.style.background='white';
}




function maketitle()
{
 for(i = 0; i < document.all.length; i++){
	   var t=document.all(i);
	   if (t.id.substr(0,9)=='maketitle')
	   {
 		  divtitle.innerHTML+='<span id=Shadow812_'+t.id+'  style="position:absolute; display:none; "></span>';
 		           var ss1=document.getElementById('Shadow812_'+t.id+'');
			   ss1.innerHTML=t.innerHTML;
			   ss1.className=t.className+'shadow';
			   ss1.style.top=gettop(t)-1;
			   ss1.style.left=getleft(t)-1;
			   ss1.style.width=t.offsetWidth;
			   ss1.style.display='';	   
	   };
 };

}








function move(qwhat,qto,x,y)
{
 var awhat=document.getElementById(qwhat);
 var ato=document.getElementById(qto);
 awhat.style.left=getleft(ato)+x;
 awhat.style.top=gettop(ato)+y;

}




function t1height()
{
  if (g('t1').offsetHeight<150) 
  {
    g('t1').style.height=g('t1').offsetHeight+5;
    setTimeout('t1height();',5);
  }


}





function photoshowdo()
{
  runJS('photoShow.htm');
}


var iss=1;
var workss=0;


/////////////////////////////////////////////////

function startss()
{
 shadowss.style.left=page.offsetLeft;
 shadowss.style.width=page.offsetWidth;
 shadowss.style.top=page.offsetTop;
 shadowss.style.height=page.offsetHeight;       

 tss.style.width=920;

 tss.style.left=(page.offsetWidth-920)/2; 
 tss.style.height=800; //(page.offsetWidth-tss.offsetWidth)/2; 
 

 var t=(getWindowSize().height-800)/2+document.body.scrollTop;
 if (t<document.body.scrollTop) t=10;
 tss.style.top=t;




 shadowss.style.display='';
 tss.style.display='';

 if (iss<=5)  {
   shadowss.className='ss'+(iss*2-1);
   iss+=1;
   setTimeout(startss, 15);   
 }
 if (iss==5) {
   workss=1;
   photoshowSS();
 }

}


function photoshowSS()
{
   runJS('showSS.htm');
}


function menussmove()
{
 menuss.style.top=menuss.offsetTop+8;
 if (menuss.offsetTop<document.body.scrollTop)  {
   setTimeout(menussmove, 35);   
 }
}



function runmenuss()
{
 menuss.style.left=page.offsetLeft;
 menuss.style.width=page.offsetWidth;

 t=document.body.scrollTop;
 menuss.style.top=t-80;
 menuss.style.display='';

 menussmove();

}


function menussmove1()
{
 menuss.style.top=menuss.offsetTop-8;
 if (menuss.offsetTop>document.body.scrollTop-80)  {
   setTimeout(menussmove1, 5);   
 }
 else
 {
   menuss.style.display='none';
 }

}


function closess()
{
  menussmove1();
}



function showvarsstime()
{
 g('sstime').innerHTML=varsstime;

}

function incsstime()
{
 if (varsstime>1) {varsstime-=1;}
 showvarsstime();
}
function decsstime()
{
 if (varsstime<31) {varsstime+=1;}
 showvarsstime();
}


function finishss()
{
 workss=0;
 menuss.style.display='none';
 shadowss.style.display='none';
 tss.style.display='none';
}




/////////////////////////////////////////////
function startAA()
{
 shadowss.style.top=page.offsetTop;
 shadowss.style.height=page.offsetHeight+'px';       


 tss.style.height=550+'px';
 

 var t=(getWindowSize().height-560)/2+document.body.scrollTop;
 if (t<1) t=1;
 g('tsstop').height=t+'px';
 tss.style.top=0+'px';

 
 if (shadowss.className!='ss9') shadowss.className='ss'+(iss*2-1);
 tss.className='ss1';
 tss.style.display='';
 shadowss.style.display='';




 if (iss<=5)  {
  if (shadowss.className!='ss9') shadowss.className='ss'+(iss*2-1);
   tss.className='ss1';
   iss+=1;
   setTimeout(startAA, 5);   
 }
 else 
 {
   tss.className='';
 }

}




function menussmove()
{
 menuss.style.top=menuss.offsetTop+8;
 if (menuss.offsetTop<document.body.scrollTop)  {
   setTimeout(menussmove, 35);   
 }
}




function gettop(e){ // e - îáúåêò 
	var left = 0;
	var top = 0;
	while (e.offsetParent){
	left += e.offsetLeft;
	top += e.offsetTop;
	e = e.offsetParent;
	}
	left += e.offsetLeft;
	top += e.offsetTop;
	return top;
}


function getleft(e){ // e - îáúåêò
	var left = 0;
	var top = 0;
	while (e.offsetParent){
	left += e.offsetLeft;
	top += e.offsetTop;
	e = e.offsetParent;
	}
	left += e.offsetLeft;
	top += e.offsetTop;
	return left;
}



function afNeed()
{
alert('Äëÿ ðàáîòû ñ ñåðâèñîì Ìîÿ àôèøà íåîáõîäèìî çàðåãèñòðèðîâàòüñÿ, ÷òîáû ñàéò ïîíèìàë, ÷òî Âû ýòî Âû è ÷òî ýòî Âàøà Ìîÿ àôèøà. Îòêðûâàþ ðåãèñòðàöèþ.'); 
}