function w(n, w, h)
{
	w+=20;
	h+=30;
	window.open(n, '_blank', 'width='+w+', height='+h+', toolbar=no, location=no, status=no, 			menubar=no, scrollbars=auto, resizable=yes');
    return false;
}
var k=0;
var mySinc=0
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function plit(num){
        var s;
        if(num==7){
                s='sokol/wall13.jpg';
        }else if(num==10){
                s='sokol/wall1.jpg';
        }else if(num==8){
                s='sokol/wall38.jpg';
        }else if(num==5){
                s='sokol/wall5.jpg';
        }else if(num==3){
                s='sokol/wall22.jpg';
        }else if(num==4){
                s='sokol/wall6.jpg';
        }else if(num==12){
                s='sokol/wall15.jpg';
        }else if(num==11){
                s='sokol/wall17.jpg';
        }else if(num==13){
                s='sokol/wall18.jpg';
        }else if(num==2){
                s='sokol/wall21.jpg';
        }else if(num==9){
                s='sokol/wall26.jpg';
        }else if(num==1){
                s='sokol/wall23.jpg';
        }else {
                s='sokol/wall2.jpg';
        }
        window.open(s, '_blank', 'scrollbars=no,status=no,width=415,height=680');
}

function myFunc(){
  if(mySinc>=6){
//       alert(mySinc);
       mySinc=0;
       window.document.leftWave.SetVariable("mySinc",1);
       window.document.rightWave.SetVariable("mySinc",1);
       window.document.center.SetVariable("mySinc",1);
  }
}
function ret(myVar){
  //alert(myVar);
  if(myVar>2){
        window.document.leftWave.SetVariable("gogo", myWidth);
        window.document.rightWave.SetVariable("gogo", myWidth);
        window.document.center.SetVariable("gogo", myWidth);
  }
}
function center_DoFSCommand(args) {
 if(args!=888){

  k++;
  ret(k);
  var centerObj = InternetExplorer ? center : document.center;
  //
  // Place your code here...
  //
 }else{
  mySinc++;
  myFunc();
 }
}
function leftWave_DoFSCommand(args) {
 if(args!=777){
  k++;
//  alert(k);
  ret(k);
  var leftWaveObj = InternetExplorer ? leftWave : document.leftWave;
  //
  // Place your code here...
  //
 }else{
  mySinc++;
  myFunc();
 }
}
function rightWave_DoFSCommand(args) {
 if(args!=666){
  k++;
//  alert(k);
  ret(k);
  var rightWaveObj = InternetExplorer ? rightWave : document.rightWave;
  //
  // Place your code here...
  //
 }else{
  mySinc++;
  myFunc();
 }
}



if (navigator.appVersion.substring(0,1)=="4") {
        s=screen;
        myWidth=s.width;
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
          navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
        document.write('<SCRIPT LANGUAGE=VBScript\> \n');
        document.write('on error resume next \n');
        document.write('Sub center_FSCommand(ByVal command, ByVal args)\n');
        document.write('  call center_DoFSCommand(command, args)\n');
        document.write('end sub\n');
        document.write('</SCRIPT\> \n');
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
          navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
        document.write('<SCRIPT LANGUAGE=VBScript\> \n');
        document.write('on error resume next \n');
        document.write('Sub leftWave_FSCommand(ByVal command, ByVal args)\n');
        document.write('  call leftWave_DoFSCommand(command, args)\n');
        document.write('end sub\n');
        document.write('</SCRIPT\> \n');
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
          navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
        document.write('<SCRIPT LANGUAGE=VBScript\> \n');
        document.write('on error resume next \n');
        document.write('Sub rightWave_FSCommand(ByVal command, ByVal args)\n');
        document.write('  call rightWave_DoFSCommand(command, args)\n');
        document.write('end sub\n');
        document.write('</SCRIPT\> \n');
}

function open_picture(u,w,h,max_w,max_h) {
//	alert("here " +u);
	if (window.screen) {
		max_w = window.screen.width - 20;
		max_h = window.screen.height - 53;
	}
	win_w = w + 0;
	win_h = h + 0;
	if (win_w > max_w) win_w = max_w;
        if (win_h > max_h) win_h = max_h;
	win = window.open('','',"width=" + win_w + ", height=" + win_h + ",scrollbars=auto,resizable=1,resizable=yes");
	win.document.open();
	win.document.write('<body bgcolor=#F1F2F2 leftMargin=0 rightMargin=0 topMargin=0 marginwidth=0 marginheight=0>');
	win.document.write('<img width=' + w + ' height=' + h + ' src="' + u + '">');
	win.document.close();
 	win.focus();
        return(win);
}

