//
// Kasumix.com 
// Realtime swap rate
//
// copyright 2009 kasumix.com
//
	var scripts;
	if ( document.getElementsByTagName )
		scripts = document.getElementsByTagName("script");
	else if ( document.scripts )
		scripts = document.scripts;
	else if ( document.all && document.all.tags )
		scripts = document.all.tags("script");

	var script = scripts[scripts.length -1];
	var src = script.src;
	var srcCss = src.split("css=");

	if ( src && src.indexOf("?") != -1 )
		src = src.substring( src.indexOf("?") + 1 );
	else
		src = "USDJPY|EURJPY|GBPJPY|ZARJPY|TRYJPY|EURTRY|USDTRY";

	var len, h, elm, st, hfHeight;
	
	switch(srcCss[1])
	{
		case "default"	:
		case "red"		:
		case "blue"		:	hfHeight = 31;
							trHeight = 20;
							break;
		case "elegant"	:
		case "black"	:
		case "navy"		:	hfHeight = 50;
							trHeight = 20;
							break;
		case "cute"		:	hfHeight = 87;
							trHeight = 20;
							break;
		default			:	hfHeight = 31;
							trHeight = 20;
							break;
	}
	
    /*len = ( src.length + 1 ) / 7;
    if ( len > 50 ) len = 50;
    h = Math.ceil( (len + 1) * 20 + hfHeight );*/
	h = ( src.split("|").length + 2 ) * trHeight + hfHeight;

    st =  "style=\"";
    st += "width:170px; ";
    st += "height:" + h + "px; ";
    st += "margin:0px; ";
    st += "padding:0px; ";
    st += "border-width:0px; ";
    st += "border-style:none;\" ";

    document.write( "<iframe id=\"Kasumix_swap_layer1\" marginheight=\"1\" marginwidth=\"1\" scrolling=\"no\" border=\"0\" frameborder=\"0\" valign=\"bottom\" ");
	document.write( st );
	document.write( "src=\"http://www.kasumix.com/blogparts/swap.php?disp=" + src + '"' );
	document.write( " >kasumix.com</iframe><br />" );