function copyDDL(var1){
var varSource=document.getElementsByTagName("select")[var1];
for(i=0;i<varSource.options.length;i++){document.write("<option value='" + varSource.options[i].value +"'>"+ varSource.options[i].text + "</option>");}}

function swapping(var1,var2)
{
	document.getElementsByTagName("select")[var2].selectedIndex=var1;
}
function swapTop(var1,var2)
{
	document.getElementsByTagName("select")[var2].selectedIndex=var1;
	var topName=document.getElementById("ddlTop").options[var1].text;
	MM_swapImage('ImageTop','','/Products/top/' + topName.substring(0,3) + 's.jpg',0);	
}
function swapBot(var1,var2)
{
	document.getElementsByTagName("select")[var2].selectedIndex=var1;
	var botName=document.getElementById("ddlBot").options[var1].text;
	MM_swapImage('ImageBot','','/Products/bottom/' + botName.substring(0,3) + 's.jpg',0);
	
}
function swapCut(var1,var2)
{
	document.getElementsByTagName("select")[var2].selectedIndex=var1;
	var cutName=document.getElementById("ddlCut").options[var1].text;	
	MM_swapImage('ImageCut','','/Images/' + cutName + '.jpg',0);
}

function swapLycra(var1,var2)
{
	document.getElementsByTagName("select")[var2].selectedIndex=var1;	
	var fabricName=document.getElementById("ddlLycra").options[var1].text;	
	MM_swapImage('ImageLycra','','/Images/fabric/' + fabricName + '.jpg',0);
}
function swapTrim(var1,var2){
	document.getElementsByTagName("select")[var2].selectedIndex=var1;	
	var fabricName=document.getElementById("ddlTrim").options[var1].text;	
	MM_swapImage('ImageTrim','','/Images/fabric/' + fabricName + '.jpg',0);
}

function CollectCustomText(){

var getTorso,getFull,getUnder,getWaist,getHip,getWaistm,getHipm,getThighm,CombinedValue;
getTorso=document.getElementById("txtTorso").value;
getFull=document.getElementById("txtFull").value;
getUnder=document.getElementById("txtUnder").value;
getWaist=document.getElementById("txtWaist").value;
getHip=document.getElementById("txtHip").value;
getWaistm=document.getElementById("txtWaistm").value;
getHipm=document.getElementById("txtHipm").value;
getThighm=document.getElementById("txtThighm").value;

if(getTorso!="" || getFull!="" || getUnder!="" || getWaist!="" || getHip!="")
{		
CombinedValue="Torso Length: " + getTorso + ", Full Bust: " + getFull + ", Underbust: " + getUnder + ", Waist: " + getWaist + ", Hip: " + getHip + ", Other Requests: "; 	
} 
else if(getWaistm!="" || getHipm!="" || getThighm!="")
{		
CombinedValue="Waist: " + getWaistm + ", Hip: " + getHipm + ", Upper Thigh: " + getThighm + ", Other Requests: "; 	
}
else
{		
	CombinedValue="";	
} 

document.getElementsByTagName("textarea")[0].value=CombinedValue + document.getElementsByTagName("textarea")[0].value; 

}
function topLink(cdVar)
{
	var cddVar="{tag_productcode}";
	var topName=document.getElementById("ddlTop").options[document.getElementById("ddlTop").selectedIndex].text;
	window.location="/_product_60987/" + topName.substring(0,3) + "?ls=" + cdVar;
}

function botLink(cdVar)
{
	var cddVar="{tag_productcode}";
	var botName=document.getElementById("ddlBot").options[document.getElementById("ddlBot").selectedIndex].text;
	window.location="/_product_60988/" + botName.substring(0,3) + "?ls=" + cdVar;
}

