// JavaScript Document
function Mv(a,b){
  var i=0;
  var f=document.getElementById(a);
  var t=document.getElementById(b);
  for (var i=0; i<f.options.length;i++){
     if(f.options[i].selected){
	    var no=new Option();
		no.value=f.options[i].value;
		no.text=f.options[i].text;
		t.options[t.options.length]=no;}
	 }
	 Rv(a);
  }
function Rv(o){
    var o=document.getElementById(o);
	for(var i=o.options.length-1;i>=0;i--){
	   if (o.options[i].selected && o.options[i] !=""){
	      o.options[i].value="";
		  o.options[i].text="";
		  o.options[i]=null;
	   }
	}
}

function Page_Submit()
{
   var sel = document.myform2.sel2;
       for (var i=0; i< sel.options.length;i++){
      document.myform2.sel3.value+=sel.options[i].value+"|";
         }	
    }




function changelocation(locationid)
    {
    document.myform2.prod.length = 0; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
             document.myform2.prod.options[document.myform2.prod.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
            
    }  


function SetSize(obj,width,height)
{
	myImage=new Image();
	myImage.src=obj.src;
	if(myImage.width>0 && myImage.height>0)
	{
		var rate=1;
		if (myImage.width>width || myImage.height>height)
		{ 
		   if(width/myImage.width<height/myImage.height)
		{
			rate=width/myImage.width;
			}
			else
			{rate=height/myImage.height;}
		}
	
	if (window.navigator.appName="Microsoft Internet Explorer")
	{
		obj.style.zoom=rate;
		}
		else
		{
			obj.width=myImage.width*rate;
			obj.height=myImage.height*rate;
			}
	}}
