function f(ID){return document.getElementById(ID)}

function over(obj,ID)
{
	forechImages(ID);
	var str=obj.src.toLowerCase();
	obj.src=str.replace(".jpg","2.jpg");
}

function forechImages(ID)
{
 var arr=f(ID).getElementsByTagName("img");
 for(var i=0; i<arr.length;i++)
 {
    if(arr[i].src.toLowerCase().indexOf("2.jpg")!=-1)arr[i].src=arr[i].src.toString().replace("2.jpg",".jpg");
 }
}

function show(ID,num,II)
{
   for(var i=1;i < num+1;i++)
   {
	   if(i==II)f(ID+"_"+i).style.display='block';
	   else f(ID+"_"+i).style.display='none';
   }
}

function MM_over(id)
{
	f(id).style.display='block';
}
function MM_out(id)
{
	f(id).style.display='none';
}

function writeVideo(src,w,h)
{
	var vtype= src.split(".");
	videotype=vtype[1];
	var videcode='';
	switch(videotype)
	{
		case "flv":
	
	videcode+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">';
	videcode+='<param name="movie" value="vcastr.swf">';
	videcode+='<param name="quality" value="high">';
	videcode+='<param name="allowFullScreen" value="true" />';
	videcode+='<param name="FlashVars" value="vcastr_file='+src+'&LogoUrl=&LogoText=" />';
	videcode+='<embed src="vcastr.swf" allowFullScreen="true" FlashVars="vcastr_file='+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+w+'" ></embed>';
	videcode+='</object>';
		break;
	}
	document.writeln(videcode);
}

