function fixflash(containerID){
var flashContainer = document.getElementById(containerID);
var flashMovie = document.createElement("div");
flashMovie.innerHTML = flashContainer.innerHTML.replace(/</g, "<").replace(/>/g, ">");
flashContainer.parentNode.insertBefore(flashMovie, flashContainer);
flashContainer.parentNode.removeChild(flashContainer);
flashMovie.setAttribute("id",containerID);
}
function fixpadding()
{
	document.getElementById('MainPage').style.padding = 0;
	document.getElementById('MainPage').style.verticalAlign = 'bottom';
}

function changeStyleByLocation(myLocation)
{
	document.getElementById('Location').value = myLocation;
 	var myLocationString = document.getElementById('Location').value;
	switch (myLocationString){
		case 'http://62.90.102.103/~optoacou/index.php': {hpFlash();fixpadding()} break
		case 'http://optoacoustics.com/index.php': {hpFlash();fixpadding()} break
		case 'http://optoacoustics.com/': {hpFlash();fixpadding()} break
		case 'http://server103.http.co.il/~optoacou/': {hpFlash();fixpadding()} break
		case 'http://server103.http.co.il/~optoacou/index.php': {hpFlash();fixpadding()} break
		case 'http://62.90.102.103/~optoacou/': {hpFlash();fixpadding()} break
		case 'http://server103.http.co.il/~optoacou/index.php': {fixpadding()} break
		case 'http://62.90.102.103/~optoacou/index.php': {fixpadding()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=10': {Medical_MRI_Short(); fixflash('sounds2904-1')} break
		case 'http://62.90.102.103/~optoacou/article.php?id=10': {Medical_MRI_Short(); fixflash('sounds2904-1')} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=11': {Medical_MRI_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=11': {Medical_MRI_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=12': {Medical_MRI_Short(); fixflash('sounds3004')} break
		case 'http://62.90.102.103/~optoacou/article.php?id=12': {Medical_MRI_Short(); fixflash('sounds3004')} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=13': {Medical_MRI_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=13': {Medical_MRI_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=15': {Oil_Gas_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=15': {Oil_Gas_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=16': {Oil_Gas_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=16': {Oil_Gas_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=17': {Oil_Gas_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=17': {Oil_Gas_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=18': {Oil_Gas_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=18': {Oil_Gas_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=19': {Power_Utilities_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=19': {Power_Utilities_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=20': {Power_Utilities_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=20': {Power_Utilities_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=21': {Power_Utilities_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=21': {Power_Utilities_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=26': {Industrial_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=26': {Industrial_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=28': {Industrial_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=28': {Industrial_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=29': {Industrial_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=29': {Industrial_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=30': {Industrial_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=30': {Industrial_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=22': {Services_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=22': {Services_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=23': {Services_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=23': {Services_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=24': {Services_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=24': {Services_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=25': {Services_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=25': {Services_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=31': {Technology_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=31': {Technology_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=7': {Technology_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=7': {Technology_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=8': {Technology_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=8': {Technology_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=9': {Technology_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=9': {Technology_Short()} break
		case 'http://62.90.102.103/~optoacou/content.php?id=21': {Optical_Microphones_Short()} break
		case 'http://server103.http.co.il/~optoacou/content.php?id=21': {Optical_Microphones_Short()} break
		case 'http://62.90.102.103/~optoacou/catalog.php?op=cat&id=13': {Optical_Microphones_Short()} break
		case 'http://server103.http.co.il/~optoacou/catalog.php?op=cat&id=13': {Optical_Microphones_Short()} break
		case 'http://62.90.102.103/~optoacou/catalog.php?op=cat&id=18': {Optical_Microphones_Short()} break
		case 'http://server103.http.co.il/~optoacou/catalog.php?op=cat&id=18': {Optical_Microphones_Short()} break
		case 'http://62.90.102.103/~optoacou/catalog.php?op=cat&id=23': {Optical_Microphones_Short()} break
		case 'http://server103.http.co.il/~optoacou/catalog.php?op=cat&id=23': {Optical_Microphones_Short()} break
		case 'http://62.90.102.103/~optoacou/catalog.php?op=cat&id=28': {Optical_Microphones_Short()} break
		case 'http://server103.http.co.il/~optoacou/catalog.php?op=cat&id=28': {Optical_Microphones_Short()} break
		case 'http://62.90.102.103/~optoacou/catalog.php?op=cat&id=33': {Optical_Microphones_Short()} break
		case 'http://server103.http.co.il/~optoacou/catalog.php?op=cat&id=33': {Optical_Microphones_Short()} break
		case 'http://62.90.102.103/~optoacou/content.php?id=20': {Optical_Accelerometers_Short()} break
		case 'http://server103.http.co.il/~optoacou/content.php?id=20': {Optical_Accelerometers_Short()} break
		case 'http://62.90.102.103/~optoacou/catalog.php?op=cat&id=4': {Optical_Accelerometers_Short()} break
		case 'http://server103.http.co.il/~optoacou/catalog.php?op=cat&id=4': {Optical_Accelerometers_Short()} break
		case 'http://62.90.102.103/~optoacou/catalog.php?op=cat&id=9': {Optical_Accelerometers_Short()} break
		case 'http://server103.http.co.il/~optoacou/catalog.php?op=cat&id=9': {Optical_Accelerometers_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=33': {Noise_Reduction_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=33': {Noise_Reduction_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=35': {Noise_Reduction_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=35': {Noise_Reduction_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=36': {Noise_Reduction_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=37': {Noise_Reduction_Short()} break
		case 'http://62.90.102.103/~optoacou/article.php?id=34': {Noise_Reduction_Short()} break
		case 'http://server103.http.co.il/~optoacou/article.php?id=34': {Noise_Reduction_Short()} break
		case 'http://www.optoacoustics.com/index.php': {hpFlash();fixpadding()} break
		case 'http://www.optoacoustics.com/': {hpFlash();fixpadding()} break
		case 'http://www.optoacoustics.com/index.php': {fixpadding()} break
		case 'http://www.optoacoustics.com/article.php?id=10': {Medical_MRI_Short(); fixflash('sounds2904-1')} break
		case 'http://www.optoacoustics.com/article.php?id=11': {Medical_MRI_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=12': {Medical_MRI_Short(); fixflash('sounds3004')} break
		case 'http://www.optoacoustics.com/article.php?id=13': {Medical_MRI_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=15': {Oil_Gas_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=16': {Oil_Gas_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=17': {Oil_Gas_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=18': {Oil_Gas_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=19': {Power_Utilities_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=20': {Power_Utilities_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=21': {Power_Utilities_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=26': {Industrial_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=28': {Industrial_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=29': {Industrial_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=30': {Industrial_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=22': {Services_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=23': {Services_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=24': {Services_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=25': {Services_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=31': {Technology_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=7': {Technology_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=8': {Technology_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=9': {Technology_Short()} break
		case 'http://www.optoacoustics.com/content.php?id=21': {Optical_Microphones_Short()} break
		case 'http://www.optoacoustics.com/catalog.php?op=cat&id=13': {Optical_Microphones_Short()} break
		case 'http://www.optoacoustics.com/catalog.php?op=cat&id=18': {Optical_Microphones_Short()} break
		case 'http://www.optoacoustics.com/catalog.php?op=cat&id=23': {Optical_Microphones_Short()} break
		case 'http://www.optoacoustics.com/catalog.php?op=cat&id=28': {Optical_Microphones_Short()} break
		case 'http://www.optoacoustics.com/catalog.php?op=cat&id=33': {Optical_Microphones_Short()} break
		case 'http://www.optoacoustics.com/content.php?id=20': {Optical_Accelerometers_Short()} break
		case 'http://www.optoacoustics.com/catalog.php?op=cat&id=4': {Optical_Accelerometers_Short()} break
		case 'http://www.optoacoustics.com/catalog.php?op=cat&id=9': {Optical_Accelerometers_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=33': {Noise_Reduction_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=35': {Noise_Reduction_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=36': {Noise_Reduction_Short()} break
		case 'http://www.optoacoustics.com/article.php?id=34': {Noise_Reduction_Short()} break
		case 'http://optoacoustics.com/index.php': {hpFlash();fixpadding()} break
		case 'http://optoacoustics.com/': {hpFlash();fixpadding()} break
		case 'http://optoacoustics.com/index.php': {fixpadding()} break
		case 'http://optoacoustics.com/article.php?id=10': {Medical_MRI_Short(); fixflash('sounds2904-1')} break
		case 'http://optoacoustics.com/article.php?id=11': {Medical_MRI_Short()} break
		case 'http://optoacoustics.com/article.php?id=12': {Medical_MRI_Short(); fixflash('sounds3004')} break
		case 'http://optoacoustics.com/article.php?id=13': {Medical_MRI_Short()} break
		case 'http://optoacoustics.com/article.php?id=15': {Oil_Gas_Short()} break
		case 'http://optoacoustics.com/article.php?id=16': {Oil_Gas_Short()} break
		case 'http://optoacoustics.com/article.php?id=17': {Oil_Gas_Short()} break
		case 'http://optoacoustics.com/article.php?id=18': {Oil_Gas_Short()} break
		case 'http://optoacoustics.com/article.php?id=19': {Power_Utilities_Short()} break
		case 'http://optoacoustics.com/article.php?id=20': {Power_Utilities_Short()} break
		case 'http://optoacoustics.com/article.php?id=21': {Power_Utilities_Short()} break
		case 'http://optoacoustics.com/article.php?id=26': {Industrial_Short()} break
		case 'http://optoacoustics.com/article.php?id=28': {Industrial_Short()} break
		case 'http://optoacoustics.com/article.php?id=29': {Industrial_Short()} break
		case 'http://optoacoustics.com/article.php?id=30': {Industrial_Short()} break
		case 'http://optoacoustics.com/article.php?id=22': {Services_Short()} break
		case 'http://optoacoustics.com/article.php?id=23': {Services_Short()} break
		case 'http://optoacoustics.com/article.php?id=24': {Services_Short()} break
		case 'http://optoacoustics.com/article.php?id=25': {Services_Short()} break
		case 'http://optoacoustics.com/article.php?id=31': {Technology_Short()} break
		case 'http://optoacoustics.com/article.php?id=7': {Technology_Short()} break
		case 'http://optoacoustics.com/article.php?id=8': {Technology_Short()} break
		case 'http://optoacoustics.com/article.php?id=9': {Technology_Short()} break
		case 'http://optoacoustics.com/content.php?id=21': {Optical_Microphones_Short()} break
		case 'http://optoacoustics.com/catalog.php?op=cat&id=13': {Optical_Microphones_Short()} break
		case 'http://optoacoustics.com/catalog.php?op=cat&id=18': {Optical_Microphones_Short()} break
		case 'http://optoacoustics.com/catalog.php?op=cat&id=23': {Optical_Microphones_Short()} break
		case 'http://optoacoustics.com/catalog.php?op=cat&id=28': {Optical_Microphones_Short()} break
		case 'http://optoacoustics.com/catalog.php?op=cat&id=33': {Optical_Microphones_Short()} break
		case 'http://optoacoustics.com/content.php?id=20': {Optical_Accelerometers_Short()} break
		case 'http://optoacoustics.com/catalog.php?op=cat&id=4': {Optical_Accelerometers_Short()} break
		case 'http://optoacoustics.com/catalog.php?op=cat&id=9': {Optical_Accelerometers_Short()} break
		case 'http://optoacoustics.com/article.php?id=33': {Noise_Reduction_Short()} break
		case 'http://optoacoustics.com/article.php?id=35': {Noise_Reduction_Short()} break
		case 'http://optoacoustics.com/article.php?id=36': {Noise_Reduction_Short()} break
		case 'http://optoacoustics.com/article.php?id=34': {Noise_Reduction_Short()} break
	}
}
function Medical_MRI_Short(){
	document.getElementById('Medical_MRI_Short').src = 'images/Optoacoustic_10.jpg';	
}
function Oil_Gas_Short(){	
	document.getElementById('Oil_Gas_Short').src = 'images/Optoacoustic_09.jpg';
}
function Power_Utilities_Short(){
	document.getElementById('Power_Utilities_Short').src = 'images/Optoacoustic_11.jpg';
}
function Industrial_Short(){
	document.getElementById('Industrial_Short').src = 'images/Optoacoustic_12.jpg';
}
function Services_Short(){
	document.getElementById('Services_Short').src = 'images/Optoacoustic_13.jpg';
}
function Technology_Short(){
	document.getElementById('Technology_Short').src = 'images/Optoacoustic_05.jpg';
}
function Optical_Microphones_Short(){
	document.getElementById('Optical_Microphones_Short').src = 'images/Optoacoustic_06.jpg';
}
function Optical_Accelerometers_Short(){
	document.getElementById('Optical_Accelerometers_Short').src = 'images/Optoacoustic_07.jpg';
}
function Noise_Reduction_Short(){
	document.getElementById('Noise_Reduction_Short').src = 'images/Optoacoustic_08.jpg';
}
function medicalMOver(){
	this.src = 'images/Optoacoustic_10.jpg';	
	document.getElementById('Medical_MRI_Short').onmouseout = '';
	/**var textToCompare = document.getElementById('Medical_MRI_Short').src;
	if (textToCompare.match('images/Optoacoustic_10OP.jpg') == 'images/Optoacoustic_10.jpg'){
		this.onmouseout = '';
	}
	else {
		//this.onmouseover = "this.src = 'images/Optoacoustic_10OP.jpg'";
		this.src = 'images/Optoacoustic_10.jpg';
		//this.onmouseout = "this.src = 'images/Optoacoustic_10.jpg'";
		//alert (document.getElementById('Medical_MRI_Short').onmouseout)
	}**/
}
function medicalMOut(){
	var textToCompare = document.getElementById('Medical_MRI_Short').src;
	if (textToCompare.match('images/Optoacoustic_10.jpg') == 'images/Optoacoustic_10.jpg'){
		this.onmouseout = '';
	}
	else {
		this.src = 'images/Optoacoustic_10.jpg';
		this.onmouseover = "this.src = 'images/Optoacoustic_10.jpg'";
		this.onmouseout = "this.src = 'images/Optoacoustic_10OP.jpg'";
	}
}
function hpFlash(){
var hpFlash = '<OBJECT id=wisdomlight codeBase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 height=352 width=640 align=middle classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000>';
hpFlash += '<PARAM NAME=_cx VALUE=16510><PARAM NAME=_cy VALUE=9075><PARAM NAME=FlashVars VALUE=><PARAM NAME=Movie VALUE=images/wisdomlight.swf><PARAM NAME=Src VALUE=images/wisdomlight.swf><PARAM NAME=WMode VALUE=Window>';
hpFlash += '<PARAM NAME=Play VALUE=-1><PARAM NAME=Loop VALUE=0><PARAM NAME=Quality VALUE=High><PARAM NAME=SAlign VALUE=><PARAM NAME=Menu VALUE=-1><PARAM NAME=Base VALUE=><PARAM NAME=AllowScriptAccess VALUE=sameDomain><PARAM NAME=Scale VALUE=ShowAll>';
hpFlash += '<PARAM NAME=DeviceFont VALUE=0><PARAM NAME=EmbedMovie VALUE=0><PARAM NAME=BGColor VALUE=FFFFFF><PARAM NAME=SWRemote VALUE=><PARAM NAME=MovieData VALUE=><PARAM NAME=SeamlessTabbing VALUE=1><PARAM NAME=Profile VALUE=0>';
hpFlash += '<PARAM NAME=ProfileAddress VALUE=><PARAM NAME=ProfilePort VALUE=0><PARAM NAME=AllowNetworking VALUE=all><PARAM NAME=AllowFullScreen VALUE=false>';
hpFlash += '<embed src=images/wisdomlight.swf quality=high bgcolor=#ffffff id=wisdomlight Loop=0 width=640 height=352 name=wisdomlight align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer /></OBJECT>';
document.getElementById('hpFlashPlace').innerHTML = hpFlash;
}