/* copyright 2003 RomanticRoad e.K. all rights reserved.  Title:  JS For The Homepage  */


var scrw = 1024 ;
var pfont = 15;

function adaptTxtTag(tagdotclass,txtwidth,dfontsz)
{
	var paraw =  Math.floor(txtwidth * scrw / 1024);
	var fontsz = pfont + dfontsz;
	document.write("<style type='text/css'>" + tagdotclass +  "{font-size:" + fontsz + "px;}</style>");  
	document.write("<style type='text/css'>" + tagdotclass +  "{width:" + paraw + "px;}</style>");      
}

function chgstyleID(idname,xpos, ypos)
{
	var posx =  Math.floor(xpos * scrw / 1024);
	var posy =  Math.floor(ypos * scrw / 1024);
	document.write("<style type='text/css'>#" + idname + " {position: absolute; top:" + posy + "px;  left:" + posx + "px;}</style>");  
} 

function adaptWidth(tagdotclass,tagwidth)
{
	var tagw = Math.floor(tagwidth  * scrw / 1024);
	document.write("<style type='text/css'>" + tagdotclass +  "{width:" + tagw + "px;}</style>");    
}

function adaptSize(tagdotclass,tagwidth,tagheight)
{
	var tagw = Math.floor(tagwidth  * scrw / 1024);
	var tagh = Math.floor(tagheight  * scrw / 1024);
	document.write("<style type='text/css'>" + tagdotclass +  "{width:" + tagw + "px;}</style>");    
	document.write("<style type='text/css'>" + tagdotclass +  "{height:" + tagh + "px;}</style>");    
}

function adaptImg(pathname,imgwidth,imgheight,classname)
{
	// var jpgname = "../images/" + pgname + ".jpg";
	var imgw = Math.floor(imgwidth * scrw / 1024)
	var imgh = Math.floor(imgheight * scrw / 1024)
	document.write("<img src='" + pathname + "'  width='" + imgw + "' height='" + imgh + "' border='0'  class='" + classname + "' />");
}

function rrlink(hreftxt,visibletxt,classname)
{
	var copyrt = "&copy; RomanticRoad e.K.";
	document.write("<p class='" + classname + "'><a  href='" + hreftxt +  "'>" + visibletxt +  "</a></p>");
	imgglass(75,10);
	document.write("<p class='" + classname + "'><a href='http://www.romanticroad.eu/copyright'>" + copyrt + "</a></p>");
}


function imggif(filepath,imgwidth,imgheight,classname)
{
	var imgw = Math.floor(imgwidth * scrw / 1024)
	var imgh = Math.floor(imgheight * scrw / 1024)
	var gifname = filepath + scrw + ".gif";
	document.write("<img src='" + gifname + "'    width='" + imgw + "'    height='" + imgh + "'  border='0'   class='" + classname + "' />");
}

function imgglass(imgwidth,imgheight)
{
	var imgw = Math.floor(imgwidth * scrw / 1024)
	var imgh = Math.floor(imgheight * scrw / 1024)
	var gifname = "images/glass.gif";
	document.write("<img src='" + gifname + "'    width='" + imgw + "'    height='" + imgh + "'  border='0'  />");

}


/*  Main Program Code  */ 

var dxscreen = screen.width;
var dyscreen = screen.height;
var dywin = dyscreen - 55;

	if ( dxscreen < 950 )
	{
		scrw = 800;
		pfont = 11;
		dxwin = 484; 
	}
	else
	{
		if ( dxscreen <  1100 )
		{
			scrw = 1024;
			pfont = 15;
			dxwin = 620; 
		}
		else
		{	
			if ( dxscreen < 1250 )
			{
				scrw = 1152;
				pfont = 17;
				dxwin = 698; 
			}
			else
			{
				scrw = 1280;
				pfont = 18;
				dxwin = 775; 
				if (dyscreen < 950)
				{
					scrw = 1152;
					pfont = 17;
					dxwin = 698; 
				}
				if (dyscreen < 850)
				{
					scrw = 1024;
					pfont = 15;
					dxwin = 620; 
				}
			}
		}
	}


/*  end main  */
