// ---------------------------------
// Themenwechsel feststellen
// ---------------------------------
var quads_left  = "";
var quads_right = "";

if (topic == "impressum" || topic == "edit"){
// Quads left
quads_left = '<img src="../../../pic/quads/free_left.jpg" width="290" height="400">';
// Quads right
quads_right = '<img src="../../../pic/quads/free_right.jpg" width="290" height="400">';

}else if (parent.topic!=topic){
// Quads left
quads_left = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="290" height="400"> <param name="movie" value="../../../swf/quads/quad_'+topic+'_left.swf"> <param name="quality" value="high"> <embed src="../../../swf/quads/quad_'+topic+'_left.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="290" height="400"></embed> </object>';
// Quads right
quads_right = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="290" height="400"> <param name="movie" value="../../../swf/quads/quad_'+topic+'_right.swf"> <param name="quality" value="high"> <embed src="../../../swf/quads/quad_'+topic+'_right.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="290" height="400"></embed> </object>';
}else{
// Quads left
quads_left = '<img src="../../../pic/quads/'+topic+'_left.jpg" width="290" height="400">';
// Quads right
quads_right = '<img src="../../../pic/quads/'+topic+'_right.jpg" width="290" height="400">';
}
// Thema setzen
parent.topic = topic;

// ---------------------------------
// sound on/off
// ---------------------------------
var sound_btn = '';

if (parent.sound) sound_btn = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="20" height="20" title="sound"> <param name="movie" value="../../../swf/back_music_btn_'+parent.sound+'.swf"> <param name="quality" value="high"> <embed src="../../../swf/back_music_btn_'+parent.sound+'.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="20" height="20"></embed></object>';

//if (parent.is_new && topic!="home"){
if (parent.enter && parent.sound=="on" && topic!="home"){
	parent.bottom.location.href = "../../../html/sound/html/sound_on.html"; 
	parent.enter = false;
}
// ---------------------------------
// Preloading
// ---------------------------------
// Standbilder vorladen
var	preload_obj = new Array("../../../pic/quads/"+topic+"_left.jpg","../../../pic/quads/"+topic+"_right.jpg");
function preload(a) { 
    if (a!=null){
	var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}}
}

// Popup
function popup(content, title, x, y){  
  // Popup zentrieren
  var nwl = (screen.width-x)/2;
  var nwh = (screen.height-y)/2;
  // Popup anzeigen
  popUp=window.open(content, 'title', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+x+', height='+y+', left='+nwl+',top='+nwh+'');
  popUp.window.focus();
}

// ---------------------------------
// Counter
// ---------------------------------
cstatus = "active";
visible = "0";
page_title = "";
url_of_counter_file = "http://www.caroline-beil.de/php/counter/counter.php";
page_url = unescape( location.href );
referrer = ( document.referrer ) ? document.referrer : "";
page_title = ( page_title.length == 0 ) ? document.title : page_title;
document.write( "<script type=\"text/javascript\" src=\"" );
document.write( url_of_counter_file + "?chCounter_mode=js&amp;jscode_version=3.1.3&amp;status=" + cstatus + "&amp;visible=" + visible + "&amp;page_title=" + encodeURIComponent( page_title ) );
document.write( "&amp;page_url=" + encodeURIComponent( page_url ) + "&amp;referrer=" + encodeURIComponent( referrer ) + "&amp;res_width=" + screen.width + "&amp;res_height=" + screen.height + "\"><" + "/script>" );
