
/*********************************************************************************

dcr3d.js
// Safari: correct a bug when displaying Shockwave director 3D movies
// Camino: same, all versions until now ( march 2007 ) - To watch for future versions.
// Read the doc @: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=f6b002d1
// Safari: affected versions: Prior to 416.12 ( Safari build )
// More info about Safari versions: http://developer.apple.com/internet/safari/uamatrix.html
  
**********************************************************************************/

function dcr3d () {

if (/camino/i.test(navigator.userAgent)) { correct3dOs (); }


if (/WebKit/i.test(navigator.userAgent)) {

		var kitName = "applewebkit/";
		var tempStr = navigator.userAgent.toLowerCase();
		var pos = tempStr.indexOf(kitName);
		var isAppleWebkit = (pos != -1);
		
		var kitVersion = tempStr.substring(pos + kitName.length,tempStr.length);
		kitVersion = kitVersion.substring(0,kitVersion.indexOf(" "));
		
 		if (kitVersion < 416.12) {
		      
		correct3dOs (); 
		      
		}
	}
}


	
function correct3dOs () {


 if (document.getElementById('d3d'))  {
		      
		      var dcr3d = document.getElementById('d3d');
		      
		      dcr3d.style.marginTop = '22px';
		      dcr3d.style.marginBottom = '0';

	}
}


function addLoadEvent(func)

{	

	var oldonload = window.onload;

	if (typeof window.onload != 'function'){

    	window.onload = func;

	} else {

		window.onload = function(){

		oldonload();

		func();

		}

	}

}




addLoadEvent(dcr3d);
