function errorBlock() {return true;}

function swichSample()
{
	if (document.all)
	{
		var oVB=document.all('sampleVB');
		var oVBS=document.all('sampleVBS');
	}
	else
	{
		var oVB=document.getElementById('sampleVB');
		var oVBS=document.getElementById('sampleVBS');
	}
	if (oVB.style.display=='none')
	{
		oVB.style.display='block';
		oVBS.style.display='none';
	}
	else
	{
		oVBS.style.display='block';
		oVB.style.display='none';
	}
}

function checkFrame()
{
	if (window.location.search=="?pass" || window.location.search=="?nomenu") return;
	var strURL=window.location.href;
	var strRef="";
	var strBase;
	var p;
	var arrBases = new Array(
	"x-dimension.de/en/xsync/",
	"x-dimension.de/xsync/",
	"x-dimension.de/en/",
	"x-dimension.de/",
	"vbxsystem.de/en/xsync/",
	"vbxsystem.de/xsync/",
	"vbxsystem.de/en/",
	"vbxsystem.de/"
	);

	for(var x=0; x<arrBases.length; x++)
	{
		p=strURL.indexOf(arrBases[x]);
		if(p>0)
		{
			p+=arrBases[x].length-1;
			break;
		}
	}

	if (p>0)
	{
		strBase=strURL.substring(0,p);
		strRef="?"+(strURL.substr(p+1).replace("?","$"));
		if (parent.frames.Menu)
		{
			parent.frames.Menu.xExpandByURL(strRef);
		}
		else window.open(strBase+strRef,"_parent");
	}
}

function showpic(strURL, lngWidth, lngHeight)
{
	window.open(strURL,'_blank','width='+(lngWidth+30)+',height='+(lngHeight+40));
}

function openTrusted(strURL)
{
	if (parent.frames.Menu) window.open(strURL,"Main");
	else window.open(strURL,"vbxExternal");
}

function setParameters()
{
	var strRef=window.location.search;
	var arrParams;
	var x;
	var p;
	if(strRef.length>1)
	{
		arrParams=strRef.substr(1).split("&")
		for(x in arrParams)
		{
			p=arrParams[x].indexOf("=");
			if(p>0)
			{
				if(document.all) document.all(arrParams[x].substr(0,p)).value=arrParams[x].substr(p+1);
				else if(document.getElementById) document.getElementById(arrParams[x].substr(0,p)).value=arrParams[x].substr(p+1);
			}
		}
	}
}

function doDownload(strID, intLevel)
{
	var strPrefix = "";
	for(var x=0;x<intLevel;x++)
	{
		strPrefix += "../";
	}
	window.open(strPrefix+"filemirror.php?did=" + strID, "_blank", "height=200,width=400");
	//window.open(strPrefix+"filemirror.php?did=" + strID, "_self");
}



window.onerror=errorBlock;
checkFrame();

//VBX System - main script file


