function swCont(pId)
{
 if(parent.swCont) parent.swCont(pId);
}

function swArv(pId,sh)
{
 var ihtml1,ihtml2="";
 if(sh)
 {
  ihtml1="<a href=\"#\" onClick=\"swArv( '" + pId + "', 0 )\"> Piiloita arvostelut</A><BR>";
  ihtml2="<iframe width=\"431\" height=\"100\" frameborder=\"0\" src=\"" + pId + "/" + pId + "_arvostelut.html\" id=\"" + pId + "_arvostelut_frame\" name=\"" + pId + "_arvostelut_frame\"></iframe>";
 }
 else ihtml1="<a href=\"#\" onClick=\"swArv( '" + pId + "', 1 )\">Arvostelut</A><BR>";
 document.getElementById(pId+'_arvostelut_linkki').innerHTML=ihtml1;
 document.getElementById(pId+'_arvostelut_sis').innerHTML=ihtml2;
 if(!sh && parent.adjIfH) parent.adjIfH(window);
}

function swSan(pId, sh)
{
 var ihtml1,ihtml2="";
 if(sh)
 {
  ihtml1="<a href=\"#\" onClick=\"swSan( '" + pId + "', 0 )\">Piiloita sanat</A><BR>";
  ihtml2="<iframe width=\"431\" height=\"100\" frameborder=\"0\" src=\"" + pId + "/" + pId + "_sanat.html\" id=\"" + pId + "_sanat_frame\" name=\"" + pId + "_sanat_frame\"></iframe>";
 }
 else ihtml1="<a href=\"#\" onClick=\"swSan( '" + pId + "', 1 )\">Sanat</A><BR>";
 document.getElementById(pId+'_sanat_linkki').innerHTML=ihtml1;
 document.getElementById(pId+'_sanat_sis').innerHTML=ihtml2;
 if(!sh && parent.adjIfH) parent.adjIfH(window);
}

function adjIfH(ifW)
{
 if(ifW.document.height)
 {
  var ifE=document.getElementById(ifW.name);
  ifE.style.height=ifW.document.height + 10 + 'px';
 }
 else if(document.all)
 {
  var ifE=document.all[ifW.name];
  if(ifW.document.compatMode && ifW.document.compatMode != 'BackCompat') ifE.style.height=ifW.document.documentElement.scrollHeight + 10 + 'px';
  else ifE.style.height=ifW.document.body.scrollHeight + 10 + 'px';
 }
 if(parent.adjIfH) parent.adjIfH(window);
}

function contOnL()
{
 if(parent.adjIfH) parent.adjIfH(window);
}

function swIfSrc(newSrc)
{
 if(parent.swIfSrc) parent.swIfSrc(window, newSrc);
}
