$(document).ready(function() {load();resizeCaller();});
function getStyle(el,styleProp)
{
	if (el.currentStyle)
		var y=el.currentStyle[styleProp];
	else if (window.getComputedStyle)
		var y=document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
	return y;
}

function load()
{
	l0=document.getElementById('line0');
	if(!l0) return;
	m=document.getElementById('newsletterbox_mail');
	nb=document.getElementById('nbox');
	mw=document.getElementById('nlbmw');
	l0.style.width='940px';
	nb.style.width='202px';
	mw.style.width='150px';
	if (typeof(adtype) != 'undefined')
	{
		e=document.getElementById('Laddbox120600');
		n=document.getElementById('main_head_newsletter');
		if (adtype == 'wallpaper')
			{ n.style.width='227px';l0.style.width='955px';m.style.width='162px';nb.style.width='217px';mw.style.width='164px';}
		if (adtype == 'expwallpaper')
			{ e.style.position='absolute';e.style.top='95px';e.style.cursor='pointer';n.style.width='387px';l0.style.width='1115px';m.style.width='322px';nb.style.width='377px';mw.style.width='326px';}
	}
	nb.style.display="inline";
	document.getElementById('main_head_bannerI').style.display="inline";

	if (typeof(bgcolor) != 'undefined' && bgcolor != null)
		{ document.body.style.backgroundColor=bgcolor; }
	if (typeof(bgimage) != 'undefined' && bgimage != null)
		{ document.body.style.backgroundImage=bgimage;}
	if (typeof(adclick) != 'undefined' && adclick != null)
		{ document.getElementById('Laddbox120600').onclick=function() { window.open(adclick); }; document.getElementById('Laddbox120600').style.cursor='pointer'; }
}

/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
* modified 20/12/2010
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["vheight1"]

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller()
{
	for (i=0; i<iframeids.length; i++)
		if (document.getElementById)
			resizeIframe(iframeids[i])
}

function resizeIframe(frameid)
{
	var currentfr=document.getElementById(frameid)
	if (currentfr && !window.opera)
	{
		currentfr.style.display="block";
		if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
			currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
		else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
			currentfr.height = currentfr.Document.body.scrollHeight;

		if (currentfr.addEventListener)
			currentfr.addEventListener("load", readjustIframe, false)
		else if (currentfr.attachEvent){
			currentfr.detachEvent("onload", readjustIframe) // Bug fix line
			currentfr.attachEvent("onload", readjustIframe)
		}
	}
}

function readjustIframe(loadevt)
{
	var crossevt=(window.event)? event : loadevt
	var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
	if (iframeroot)
		resizeIframe(iframeroot.id);
}

