// JavaScript Document
	var movieName = "Clipboard";
	function thisMovie(movieName) {
	  if (navigator.appName.indexOf ("Microsoft") !=-1) {
		return window[movieName]
	  }	else {
		return document[movieName]
	  }
	}
		
	function copyit(stuff) {
	  thisMovie(movieName).LoadMovie(1,"copy.swf?copyvar='somthing'");
	}
	
	function ideate(){alert("wang");}

	function showDiv(id){document.getElementById(id).style.display = "block";}	
	
	function hideDiv(id){document.getElementById(id).style.display = "none";}
	
	function changeMemberImage(sel, orig)
	{
		var str = sel.options[sel.selectedIndex].value;
		if(str == "none")
		{
			document.getElementById('featureMember').src = "../images/members/"+orig;
			return;
		}
		var img = str.split(",");
		if(img[1] != "")
		{
			document.getElementById('featureMember').src = "../images/members/"+img[1];
		}
	} 
	
	function radioClick(id)
	{
		document.getElementById(id).checked="checked";
	}
	
	function changeBgColor(id, color)
	{
		document.getElementById(id).style.backgroundColor = color;
		return;
	}
	
	function productTypeSelected(selObj)
	{
		if(selObj.options[selObj.selectedIndex].value == "product")		
			ajaxFunction("showAddProd=1", 'productDetails');
		else
			document.getElementById('productDetails').innerHTML= "";				
	}
	var count = 1;
	function addColor()
	{
		var color = document.getElementById('color').value;
		if(color == "")
		{
			alert("Please enter a color!");
			document.getElementById('color').focus();
			return;
		}
		document.getElementById('color').value = '';
		var text = "<div id='cd_"+count+"'>";
		text += color+" <input class='button' type='button' value='remove' onclick='removeColor(\"cd_"+count+"\")' /><br />";
		text += "<input type='hidden' value='"+color+"' name='c_"+count+"' />";
		text += "</div>";
		document.getElementById('colors').innerHTML += text;
		count++;
	}
	
	function removeColor(id)
	{
		var d = document.getElementById('colors');
		var olddiv = document.getElementById(id);
		d.removeChild(olddiv);
	}

	
	function ajaxFunction(getVals, targetId)
	{
		//alert("in");
		var browserType;
		var xmlHttp;
		try
		{
			// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{
			// Internet Explorer
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
	
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 && targetId != "none")
			{
				document.getElementById(targetId).innerHTML = xmlHttp.responseText;	
			}
		}
		
		xmlHttp.open("GET", "functions/ajaxWork.php?"+getVals, true);
		xmlHttp.send(null);
	}

