window.name='tjPageMain';

imSwE=0; if (document.images) {
imSrc=new Array('img/n.gif','img/dot.gif');
im=new Array();
for (var i=0; i<=imSrc.length; i++) {
im[i]=new Image();
im[i].src=imSrc[i];}
imSwE=1;}

function iSw(iOb,ImN) {
if (imSwE) {
dObj=eval('document.'+iOb);
dObj.src=im[ImN].src;}}

function mailIc(m) {
 if (m==1) {
//  iSw('em',2); 
  if (document.all) document.all.email.style.filter='none';}
 else {
//  iSw('em',3);
  if (document.all) document.all.email.style.filter='alpha(opacity=80)';}}

objR=Math.floor(Math.random()*500+300);
objF=Math.floor(Math.random()*6.28);
objR2=objR;
objVR=objR/3;
objVF=.2;

function anim(dIrSC) {n=0;
elem=new Array();
if (document.all) {
 elem[0]=document.all.menu.style;
 elem[1]=document.all.title.style;
 if (document.all.news) {
  elem[2]=document.all.news.style;
  n=1;}}

else {
 elem[0]=document.getElementById('menu').style;
 elem[1]=document.getElementById('title').style;
 if (document.getElementById('news')) {
  elem[2]=document.getElementById('news').style;
  n=1;}}

dIr=dIrSC; lp=1; animMain(n);}


function setPos(n,x,y) {
 elem[n].left=x;
 elem[n].top=y;}

function animMain(n) {
if (dIr<0) {
if (objR<=1) {objR=0; lp=0;}} else {
if (objR>500) lp=0;}
objX=objR*Math.sin(objF);
objY=objR*Math.cos(objF);
setPos(0,objX,objY);
setPos(1,-objX,-objY);if (n){
setPos(2,objR*Math.sin(-objF+2),objR*Math.cos(-objF+2));}
objR+=dIr*objVR*(objR/objR2+.01);objF+=dIr*objVF;
if (lp) setTimeout("animMain(n)",50);}

function smsForm(send_sms,lng) {
 document.write(
 '<div class=alpha>'+
 '<form method=post action="/cgi-bin/main/index" onSubmit="if (this.sms_text.value) {anim(5); return true} else return false">'+
 '<input type=hidden name=lng value="'+lng+'">'+
 '<table border=0 cellspacing=0 cellpadding=5>'+
    '<tr><td><input style="font:normal 800 15px tahoma, times, serif; color:#334400; background:#dedede" size=25 maxlength=450 type=text name="sms_text" maxsize=600></td>'+
	'<td><input style="font:italic 800 16px tahoma, times, serif; color:#225500; background:#55cc55" onmouseover="if (this.style) {this.style.background=\'#00ee00\'; this.style.color=\'black\'}" onmouseout="if (this.style) {this.style.background=\'#55cc55\'; this.style.color=\'#225500\'}" type=submit value="'+send_sms+'"></td></tr>'+
 '</table></form></div>');}

function mailOpen(l) {
 window.open('/cgi-bin/main/mail.pl/'+(l+1),'mailFwin','width=400,height=300');
 return false;}
