	function show(args){
		var id = arguments[0];
		var idNav = id + "Nav";
		// if more than 1 arg: hide these first
		if(arguments[1]){
			for(var i=1; i<arguments.length; i++){
				var idNavs = arguments[i] + "Nav";
				document.getElementById(arguments[i]).style.display = "none";
					if(document.getElementById(idNavs) != null)
					 document.getElementById(idNavs).innerHTML= "+";
			}
		}
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = "block";
			if(document.getElementById(idNav) != null)
			 document.getElementById(idNav).innerHTML= "-";
		}else{
			document.getElementById(id).style.display = "none";
			if(document.getElementById(idNav) != null)
			 document.getElementById(idNav).innerHTML= "+";
		}
	}

	function showTab(args){
		var id = arguments[0];
		var idTab = id + "Tab";
		// if more than 1 arg: hide these first
		if(arguments[1]){
			for(var i=1; i<arguments.length; i++){
				var idTabs = arguments[i] + "Tab";
				document.getElementById(idTabs).style.background = "#335577";	// deactivate tab
				document.getElementById(idTab).style.borderTop	= "1px solid #357";
				document.getElementById(idTab).style.borderLeft	= "1px solid #357";
				document.getElementById(idTabs).style.borderRight= "1px solid #357";
				document.getElementById(arguments[i]).style.display = "none";	// hide related text
			}
		}
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(idTab).style.background	= "#446688";		// activate tab
			document.getElementById(idTab).style.borderTop	= "1px solid #246";
			document.getElementById(idTab).style.borderLeft	= "1px solid #246";
			document.getElementById(idTab).style.borderRight= "1px solid #579";
			document.getElementById(id).style.display = "block";			// show related text
		}
	}

	function progress(args){
		// setTimeout("", 2000);
		// window.open("https://clipland.com/PRO/progress","progress","height=45,width=350,left=50,top=150,toolbar=no,location=no,resizeable=no,menubar=no")
		var id = arguments[0];
		var idBody = id + 'B';
		document.getElementById(id).style.visibility='visible';
		// document.getElementById(idBody).innerHTML= "<iframe src='https://clipland.com/PRO/progress' name='Progress' width='280' height='90' id='selcontact' frameborder='0'></iframe>";
	}
	function assist(args){
		// figting it hopeless: finally we have to do some browser detection.., borrowed from google_groups
		var agt = navigator.userAgent.toLowerCase();
		var is_opera = (agt.indexOf("opera") != -1);
		var is_ie = (agt.indexOf("msie") != -1) && document.all && !is_opera;
		var is_ie5 = (agt.indexOf("msie 5") != -1) && document.all;
		var id = arguments[0];
		var idBody = id + 'B';
		var formNo = arguments[1];
		var fieldNo = arguments[2];
		var keyword = arguments[3];
		var framePos = arguments[4];
		var dbind = document.forms[formNo].type.value;
		document.getElementById(id).style.visibility='visible';
		if(is_ie)
		 document.getElementById(id).style.top= framePos; // IE doesn't like + 'px;', so we omit it here
		else
		 document.getElementById(id).style.top= framePos + 'px;'; // NN needs it
		document.getElementById(idBody).innerHTML= "<iframe src='https://clipland.com/PRO/reelCredits?formId="+ formNo +"&dbind="+ dbind +"&Where="+ fieldNo +"&What="+ keyword +"' name='frameToForm"+ formNo +"' width='250' height='200' id='selcontact' frameborder='0'></iframe>";
	}
	function assClose(){
		if (document.getElementById('Float').style.visibility == 'visible')
			document.getElementById('Float').style.visibility='hidden';
	}
	function changeCont(args){
		var formNo = arguments[0];
		var i = arguments[1];
		var contains = document.forms[formNo].contains.value;
		if(contains == "single"){
			document.getElementById('fileMCred'+i).style.display = "none";
			document.getElementById('fileSCred'+i).style.display = "block";
			document.getElementById('fileSlCred'+i).style.display = "none";
                }else if(contains == "slate"){
                        document.getElementById('fileMCred'+i).style.display = "none";
                        document.getElementById('fileSCred'+i).style.display = "none";
			document.getElementById('fileSlCred'+i).style.display = "block";
		}else{
			document.getElementById('fileMCred'+i).style.display = "block";
			document.getElementById('fileSCred'+i).style.display = "none";
			document.getElementById('fileSlCred'+i).style.display = "none";
		}
	}
        function changeContWizard(args){
		var formName = arguments[0];
		var hide = arguments[1];
		var contains = document.forms[formName].selector.value;
		if(contains == "wizardperson"){
			document.getElementById('wizardperson').style.display = "block";
			document.getElementById('wizardcompany').style.display = "none";
			document.getElementById('wizardband').style.display = "none";
		}else if(contains == "wizardband"){
			document.getElementById('wizardperson').style.display = "none";
			document.getElementById('wizardcompany').style.display = "none";
			document.getElementById('wizardband').style.display = "block";
		}else{
                        document.getElementById('wizardperson').style.display = "none";
                        document.getElementById('wizardcompany').style.display = "block";
			document.getElementById('wizardband').style.display = "none";
		}
        }
	function imgPop(arg){
		if (document.getElementById(arg).style.width == '24px'){
			document.getElementById(arg).style.width='120px';
			document.getElementById(arg).style.height='90px';
		}else{
			document.getElementById(arg).style.width='24px';
			document.getElementById(arg).style.height='24px';
		}
	}
function addElement(arg) {
  // credits DustinDiaz.com
  // var n = document.getElementById(arguments[0]);
  var nfiles = document.getElementById(arguments[0]+'No').value;
  if(nfiles >= 15)
   return;
  var newdiv = document.createElement('div');
  var divIdName = arguments[0]+nfiles;
  newdiv.setAttribute('id',divIdName);
   // newdiv.innerHTML = "<input name='web_download" +nfiles+ "' type='text' size='40' value=''> <a href='javascript: removeElement(" +divIdName+ ")' title='remove this file'></a>";
  if(arguments[0] == 'moreURLs')
   newdiv.innerHTML = "<input name='web_download" +nfiles+ "' type='text' size='40' value=''> <a href='javascript: removeElement('" +divIdName+ "')' title='remove this file'></a>";
  else
   newdiv.innerHTML = "<input type='file' name='file_upload" +nfiles+ "' size='27' maxlength='2097152'> <a href='javascript: removeElement()' title='remove this file'></a>";
  document.getElementById(arguments[0]).appendChild(newdiv)
  document.getElementById(arguments[0]+'No').value = (nfiles - 1) + 2;
}
function removeElement(args) {
  var test = 'moreURLs';
  var d = document.getElementById('moreURLs');
  var olddiv = document.getElementById('moreURLs1');
  d.removeChild(olddiv);
}


/**************************************************
 * dom-drag.js
 * 09.25.2001
 * www.youngpup.net
 **************************************************
 * 10.28.2001 - fixed minor bug where events
 * sometimes fired off the handle, not the root.
 **************************************************/

var Drag = {

	obj : null,

	init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
	{
		o.onmousedown	= Drag.start;

		o.hmode			= bSwapHorzRef ? false : true ;
		o.vmode			= bSwapVertRef ? false : true ;

		o.root = oRoot && oRoot != null ? oRoot : o ;

		if (o.hmode  && isNaN(parseInt(o.root.style.left  ))) o.root.style.left   = "0px";
		if (o.vmode  && isNaN(parseInt(o.root.style.top   ))) o.root.style.top    = "0px";
		if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right  = "0px";
		if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";

		o.minX	= typeof minX != 'undefined' ? minX : null;
		o.minY	= typeof minY != 'undefined' ? minY : null;
		o.maxX	= typeof maxX != 'undefined' ? maxX : null;
		o.maxY	= typeof maxY != 'undefined' ? maxY : null;

		o.xMapper = fXMapper ? fXMapper : null;
		o.yMapper = fYMapper ? fYMapper : null;

		o.root.onDragStart	= new Function();
		o.root.onDragEnd	= new Function();
		o.root.onDrag		= new Function();
	},

	start : function(e)
	{
		var o = Drag.obj = this;
		e = Drag.fixE(e);
		var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
		var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
		o.root.onDragStart(x, y);

		o.lastMouseX	= e.clientX;
		o.lastMouseY	= e.clientY;

		if (o.hmode) {
			if (o.minX != null)	o.minMouseX	= e.clientX - x + o.minX;
			if (o.maxX != null)	o.maxMouseX	= o.minMouseX + o.maxX - o.minX;
		} else {
			if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
			if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
		}

		if (o.vmode) {
			if (o.minY != null)	o.minMouseY	= e.clientY - y + o.minY;
			if (o.maxY != null)	o.maxMouseY	= o.minMouseY + o.maxY - o.minY;
		} else {
			if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
			if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
		}

		document.onmousemove	= Drag.drag;
		document.onmouseup		= Drag.end;

		return false;
	},

	drag : function(e)
	{
		e = Drag.fixE(e);
		var o = Drag.obj;

		var ey	= e.clientY;
		var ex	= e.clientX;
		var y = parseInt(o.vmode ? o.root.style.top  : o.root.style.bottom);
		var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
		var nx, ny;

		if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
		if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
		if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
		if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);

		nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
		ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));

		if (o.xMapper)		nx = o.xMapper(y)
		else if (o.yMapper)	ny = o.yMapper(x)

		Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
		Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
		Drag.obj.lastMouseX	= ex;
		Drag.obj.lastMouseY	= ey;

		Drag.obj.root.onDrag(nx, ny, Drag.obj.root);
		return false;
	},

	end : function()
	{
		document.onmousemove = null;
		document.onmouseup   = null;
		Drag.obj.root.onDragEnd(	parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), 
									parseInt(Drag.obj.root.style[Drag.obj.vmode
                                    ? "top" : "bottom"]), Drag.obj.root);
		Drag.obj = null;
	},

	fixE : function(e)
	{
		if (typeof e == 'undefined') e = window.event;
		if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
		if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
		return e;
	}
};
