function cday() { 

	var	today =	new	Date()
	var	dt = today.getYear()+'-'+(today.getMonth()+1)+'-'+today.getDate()
	dt=dt.replace(/\-([0-9])(\-|$)/, "-0$1$2")
	dt=dt.replace(/\-([0-9])(\-|$)/, "-0$1$2")
	var	p1=document.getElementById('place')
	document.location.href="?date="+dt+"&place="+p1.options[p1.selectedIndex].value


//	p1=document.getElementById('month')
//	alert(m1.options[m1.selectedIndex].value+'  '+m1.options[m1.selectedIndex].text)
//alert(p1+' ---')
//alert(' ---'+p1.selectedIndex)
//alert(' ---'+p1.options[0].value)
//	place2=
//alert(' ---'+"?date="+dt+"&place="+place)
}


function cmonth() { 

	var	y1=document.getElementById('year')
	var	m1=document.getElementById('month')
	var	dt = y1.options[y1.selectedIndex].value+'-'+m1.options[m1.selectedIndex].value
	dt=dt.replace(/\-(([0-9])(\-|$))/, "-0$1$2")
	var	p1=document.getElementById('place')
	document.location.href="?date="+dt+"&place="+p1.options[p1.selectedIndex].value
}


function cplace(d) { 

	var	y1=document.getElementById('year')
	var	m1=document.getElementById('month')
	var	dt = y1.options[y1.selectedIndex].value+'-'+m1.options[m1.selectedIndex].value
//alert(d+'  -- '+length(d))
	if(d.length>0) dt += '-'+d
//alert(d+'  -- '+length(d))

	dt=dt.replace(/\-(([0-9])(\-|$))/, "-0$1$2")
	var	p1=document.getElementById('place')
	document.location.href="?date="+dt+"&place="+p1.options[p1.selectedIndex].value



}


/*
function cplace(d) { 



	var	y1=document.getElementById('year')
	var	m1=document.getElementById('month')
	var	dt = y1.options[y1.selectedIndex].value+'-'+m1.options[m1.selectedIndex].value
alert(d+'  -- '+length(d))
	if(length(d)>0) dt += '-'+d
//alert(d+'  -- '+length(d))

	dt=dt.replace(/\-(([0-9])(\-|$))/, "-0$1$2")
	var	p1=document.getElementById('place')
	document.location.href="?date="+dt+"&place="+p1.options[p1.selectedIndex].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];}
}
*/

function openwin(url,wh) { 
	try { pw.close(); }	catch (exception) {};
	pw= open(url, "pw1", wh+",status=no,toolbar=no,menubar=no,scrollbars=no");
}


/*
function calc(gid) {

	var sum=0

  if (document.getElementById) { 
    table = document.getElementById('glist')
        trs = table.getElementsByTagName('tr')

	kol=0
	for (i=1;i<trs.length-1;i++) {
		tds = trs[i].getElementsByTagName('td')
			
		inp = tds[2].getElementsByTagName('input')
		s=parseInt(inp[0].value)
		inp[0].value=s

		if(typeof(s)=='number' && !isNaN(s) && s>0){
			st=Math.round(parseFloat(tds[1].innerText)*s*100)/100
			tds[3].innerText=st
//				sum=sum+parseFloat(tds[3].innerText)
			sum=sum+st
//alert(tds[3].innerText +' - '+sum)
			kol=kol+s
		}else{
			inp[0].value=''
			tds[3].innerText=' '
		}

	}
	document.getElementById('total').innerText=Math.round(sum*100)/100



	var bi=document.getElementById('binfo')

	var a = bi.getElementsByTagName('span')
	a[0].innerText=a[0].innerText.replace(/^[0-9]+(\.[0-9]*)?/, sum)

	a = bi.getElementsByTagName('a')
	a[0].innerText=a[0].innerText.replace(/^[0-9]+(\.[0-9]*)?/, kol)
  }



	var val=''
	var found=false
	inps = document.getElementsByTagName('input')
	for (i=0;i<inps.length;i++) {
		if (inps[i].name=="num["+gid+"]" ){
			val=inps[i].value
			found=true	
		}
	}



	if(found){
//alert ("?m=basket&set["+gid+"]="+val)
		send_get("?m=basket&set["+gid+"]="+val)

	}
}

function sub2(){
	mess=''
	if (document.getElementById('author').value=='') mess+="\nНе заполнено поле Фамилия, имя, отчество";
	if (document.getElementById('phone').value=='') mess+="\nНе заполнено поле Ваш адрес, телефон";

//alert("+"+document.getElementById('phone')+"+")

	if (mess=='')
		document.getElementById('basketf').submit()
	else
		alert(mess);

}


function send_get(url){

if (window.XMLHttpRequest) { // Mozilla, Safari, ...
	http_request = new XMLHttpRequest();
	http_request.overrideMimeType('text/xml');
} else if (window.ActiveXObject) { // IE
	http_request = new ActiveXObject("Microsoft.XMLHTTP");
}

//	http_request.onreadystatechange = function() { receive_get(http_request, url); };

//	http_request.open('POST', url, true);
//	http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//	http_request.send(paramString); 


	http_request.open('GET', url, true);
	http_request.send(null);
}

*/


var slideShowSpeed = 4500; 
// Duration of crossfade (seconds) 
var crossFadeDuration = 3; 
// Specify the image files 
var Pic = new Array(); 
// to add more images, just continue 
// the pattern, adding to the array below 

if(location.href.match(/m=78$/)){
Pic[0] = 'sh-1.jpg' 
Pic[1] = 'sh-2.jpg' 
Pic[2] = 'sh-3.jpg' }
/*Pic[3] = 'sh-4.jpg' 
Pic[4] = '5.jpg' */



     if(location.href.match(/m=80$/)){
Pic[0] = 'd-1.jpg' 
Pic[1] = 'd-2.jpg' 
Pic[2] = 'd-3.jpg' 
/*Pic[3] = 'sh-4.jpg' 
Pic[4] = '5.jpg' */
     }

     if(location.href.match(/m=77$/)){
Pic[0] = 'm-1.jpg' 
Pic[1] = 'm-2.jpg' 
Pic[2] = 'm-3.jpg' 
/*Pic[3] = 'sh-4.jpg' 
Pic[4] = '5.jpg' */
     }

/*Pic[3] = 'sh-4.jpg' 
Pic[4] = '5.jpg' */

// do not edit anything below this line 
var t; 
var j = 0; 
var p = Pic.length; 
if(p>0){
 var preLoad = new Array(); 
 window.onload = runSlideShow;
 for (i = 0; i < p; i++ ) { 
 preLoad[i] = new Image(); 
 preLoad[i].src = Pic[i]; 
 } 
}


function runSlideShow() { 
if (document.all) { 
document.images.SlideShow.style.filter="blendTrans(duration=2)"; 
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; 
document.images.SlideShow.filters.blendTrans.Apply(); 
} 
document.images.SlideShow.src = preLoad[j].src; 
if (document.all) { 
document.images.SlideShow.filters.blendTrans.Play(); 
} 
j = j + 1; 
if (j > (p - 1)) j = 0; 
t = setTimeout('runSlideShow()', slideShowSpeed); 
} 



function transform2(){
myimg.filters("revealtrans").apply()
document.all.myimg.src="m-2.jpg"
myimg.filters("revealtrans").play()
}




