var show;
var isPlay = true;
var _image;
var _string = location.href;
var result1 = _string.search('contactus.php');
var result2 = _string.search('contactusg.php');
var result3 = _string.search('atelier.php');

function toggleplay(image){
	alert(result1);
	if (result1 > -1 || result2 > -1 || result3 > -1){
		location.href = 'coats.php';
	}
	else{
		if (isPlay){
			isPlay = false;
			image.src='images/icons/play.png';
			show.stop();
		}
		else{
			isPlay = true;
			image.src='images/icons/pause.png';
			show.play();
		}
	}
}

//function previous_image(){
//	isPlay = false;
//	document.getElementById("player").src='images/icons/play.png';
//	clearTimeout(timerVal);
//	timerVal=setTimeout("RunSlideShow('"+savepictureName+"','"+saveimageFiles+"',"+savedisplaySecs+","+slideCacheNumber+")",0);
//}
//
//function stop_image(){
//	isPlay = false;
//	document.getElementById("player").src='images/icons/play.png';
//	clearTimeout(timerVal);
//}
//
//function textsizer(e){
//	var evtobj=window.event? event : e //distinguish between IE's explicit event object (window.event) and Firefox's implicit.
//	var unicode=evtobj.charCode? evtobj.charCode : evtobj.keyCode
//	var actualkey=String.fromCharCode(unicode)
//	if (actualkey == " "){
//		if (_result1 > -1 || _result2 > -1 || _result3 > -1){
//			location.href = 'dresses.php';
//		}
//		else{
//			if (isPlay){
//				isPlay = false;
//				document.getElementById("player").src='images/icons/play.png';
//				clearTimeout(timerVal);
//			}
//			else{
//				isPlay = true;
//				document.getElementById("player").src='images/icons/pause.png';
//
//				timerVal=setTimeout("RunSlideShow('"+savepictureName+"','"+saveimageFiles+"',"+savedisplaySecs+",0)",0);
//			}
//		}
//	}
//}
//document.onkeypress=textsizer