function media_popup_mp3(mediaName) {
  var width = 500;
  var height = 500;
  
	var winOptions = 'toolbar=no, location=no, status=no, menubar=no, resizable=no, directories=no, scrollbars=no';
  winOptions += ', width='+width+', height='+height+', top=155, left=100';

  var newDoc = window.open('', '', winOptions);
  
  newDoc.document.write('<html><head><title>ПРОИГРЫВАЕМ MP3</title></head>');
  newDoc.document.write('<body style="padding: 0px 0px 10px 0px; margin: 0px 0px 0px 0px;">');
  
  var contentStr = '';
  //'<object type="application/x-shockwave-flash" data="http://flv-mp3.com/i/pic/ump3player_500x70.swf" height="70" width="470"><param name="wmode" VALUE="transparent" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="http://flv-mp3.com/i/pic/ump3player_500x70.swf" /><param name="FlashVars" value="way=http://flv-mp3.com/i/pic/sample.mp3&amp;swf=http://flv-mp3.com/i/pic/ump3player_500x70.swf&amp;w=470&amp;h=70&amp;time_seconds=164&amp;autoplay=0&amp;q=&amp;skin=black&amp;volume=70&amp;comment=надпись" /></object>';
  
  newDoc.document.write('</body></html>');
}

function play_item(mediaName) {
  // проверка расширения
  //media_popup_mp3(mediaName);
  alert(mediaName);
}

////////////////
var LinkDivActive = 0;
var onDiv;
var timeOnDiv;
var layerRef;
var styleRef;
var showVar;
var hideVar;
var hideDivi;
var showDivi;

if (navigator.appName == "Netscape") {
 layerRef="document.";
 styleRef="";
 showVar="'show'";
 hideVar="'hide'";
 showDivi="''";
 hideDivi="'none'";
} else {
 layerRef="document.all.";
 styleRef=".style";
 showVar="'visible'";
 hideVar="'hidden'";
 showDivi="''";
 hideDivi="'none'";
}

//Divisions Show | Hide
function switchDiv(divn) {
	eval('if ('+'document.getElementById(\''+divn+'\')'+styleRef+'.visibility == '+hideVar+') {showDiv(divn);} else {hideDiv(divn);}');
}

function hideDiv(divn) {
 eval('document.getElementById(\''+divn+'\')'+styleRef+'.visibility = '+hideVar);
 eval('document.getElementById(\''+divn+'\')'+styleRef+'.display = '+hideDivi);
}
function showDiv(divn) {
 eval('document.getElementById(\''+divn+'\')'+styleRef+'.visibility = '+showVar);
 eval('document.getElementById(\''+divn+'\')'+styleRef+'.display = '+showDivi);
}

//Link Divisions Stuff
function showLinkDiv(divn) {
 if (timeOnDiv != null) {
  clearTimeout(timeOnDiv);
  hideDiv(onDiv);
 }
 showDiv(divn);
 onDiv = divn;
}

function divTimer() {
 timeOnDiv = setTimeout("divOut()",500)
}

function divOut() {
 if (LinkDivActive == 0) {
  hideDiv(onDiv);
 } 
}

function LinkDivOver() {
 LinkDivActive = 1;
 clearTimeout(timeOnDiv);
}

function LinkDivOut() {
 LinkDivActive = 0;
 timeOnDiv = setTimeout("divOut()",500)
}

function check_form (confirmMsg) {
	var is_confirmed = confirm(confirmMsg);
	return is_confirmed;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
 window.open(theURL,winName,features);
}

function open_winiid(url) {
 mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=550,height=414');
}
function clearSearch() {
	if (document.getElementById('textasrc').value=="  Поиск:") {
		document.getElementById('textasrc').value='';
	}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document;
  if(d.images) {
    if(!d.MM_p)
        d.MM_p = new Array();
    var i,j = d.MM_p.length, a = MM_preloadImages.arguments;
    for(i=0; i<a.length; i++){
        if (a[i].indexOf("#")!=0) {
            d.MM_p[j]=new Image;
            d.MM_p[j++].src=a[i];
        }
    }
  }
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
