/******************
*  DOM Shortcuts  *
******************/
	var d = document;
	function dge(objID) {
		return d.getElementById(objID);
	};
	function dce(obj) {
		return d.createElement(obj);
	};
	function sa(obj,attr,val) {
		obj.setAttribute(attr,val);
	};
	function ac(pNode,cNode) {
		pNode.appendChild(cNode);
	};
	function dm(obj) {
		while(obj.firstChild) obj.removeChild(obj.firstChild);
	};
/*****************/

/********************
*  Add Flash Movie  *
********************/
	function add_flash_movie() {
		var flashObject = '<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="530" height="80"><param name="movie" value="/_media/flash/modelswanted.swf" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="quality" value="high" /><embed src="/_media/flash/modelswanted.swf" quality="high" width="530" height="80" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
		var flashJar = dge('flash_modelsWanted');
		dm(flashJar);
		flashJar.innerHTML = flashObject;
	};
/*******************/

/**************
*  onDOMLoad  *
**************/
	function init() {
		// quit if this function has already been called
		if (arguments.callee.done) { 
			return;
		};
	
		// flag this function so we don't do the same thing twice
		arguments.callee.done = true;
	
		// kill the timer
		if (_timer) clearInterval(_timer);
	
		/**************************
		*  RUN ONLOAD FUNCTIONS!  *
		**************************/
			if ( dge('flash_modelsWanted') && dge('home') ) {
				add_flash_movie();
			};
		/*************************/
	};
	
	/* for Mozilla/Opera9 */
	if (d.addEventListener) {
		d.addEventListener("DOMContentLoaded", init, false);
	};
	
	/* for Internet Explorer */
	/*@cc_on @*/
	/*@if (@_win32 || @_win64)
	var timer = setInterval(
		function () {
			try {
				d.documentElement.doScroll('left');
				timer = clearInterval(timer);
				init();
			} catch (e) {
			};
		}, 50
	);
	/*@end @*/
	
	/* for Safari */
	if (/WebKit/i.test(navigator.userAgent)) { // sniff
	  var _timer = setInterval(function() {
	    if (/loaded|complete/.test(d.readyState)) {
	      init(); // call the onload handler
	    };
	  }, 10);
	};
	
	/* for other browsers */
	window.onload = init;
/*************/