/*
  JavaScript File, (c) by Wahora.ch - info@wahora.ch
  
  :: Basisfunktionen zur Integration von Wahora.CH in externe Internetseiten  
  
  Created  : 20.11.2008, rw
  Modified : 22.11.2008, rw

*/


var OHWAHORAURL = "http://www.wahora.ch/ext/ohwahora.php";



function getModuleSmallHTML(sId)
{
  return '<div><div style="border: solid 1px #999999; float: left;"><iframe src="'+OHWAHORAURL+'?p=small&sid='+sId+'" style="width:206px; height:66px; border: none;" frameborder="no" scrolling="no";></iframe></div><div style="clear:both;"></div></div>';
}

function getModuleFullHTML(sId)
{
  return '<div><div style="border: solid 1px #999999; float: left;"><iframe src="'+OHWAHORAURL+'?p=full&sid='+sId+'" style="width:300px; height:165px; border: none;" frameborder="no" scrolling="no";></iframe></div><div style="clear:both;"></div></div>';
}



function loadModule(divId, sId, typ)
{
        var s= '';
        switch (typ)
        {
            case 'small':
            {
               s = getModuleSmallHTML(sId);
               break;
            }
            case 'full':
            {
               s = getModuleFullHTML(sId);
               break;
            }
            default:
            { 
               s = '';
               break;
            }
        }        
        var divObj = document.getElementById(divId)
	divObj.innerHTML = s;        
}


// die Variabeln ext_xxx werden vom Aufrufer zur Verfügung gestellt.
loadModule(ext_divId,ext_sId,ext_type);


/* End of JS */  