if( !window.parent.name || window.parent.name != "main" ){
  var redir = window.location.href.replace(/shirtconf/, "shirts");
  window.top.location.replace(redir);
}

function doPassVar(art, itemname, id, lang){
	var sendText = art+"|"+itemname+"|"+id+"|"+lang;
	window.parent.document.myFlash.SetVariable("data", sendText);

	//alert(sendText);
}

function doMonogram(pos){

  if( document.measurements.monogram_text.value != '' ){
    doPassVar('monogram_position', pos, 'none', 'none');
  } else {
    doPassVar('monogram_position', 'none', 'none', 'none');
  }
}

function getTarget(){
  if(document.checkout.terms.checked == true){
    document.checkout.target = "_top";
    return true;
  }
}

function chgBorder(id,n){
  for( var i=0; i<n; i++){
    t = 'img_' + i;
    if(document.getElementById(t).style.border) document.getElementById(t).style.border = 'none';
  }
  document.getElementById(id).style.border = '1px solid #000000';
}


function chgBorder2(id,n){
  for( var i=3; i<n; i++){
// alert(id);
   t = 'img_' + i;
   if(document.getElementById(t).style.border) document.getElementById(t).style.border = 'none';   
  }
    document.getElementById(id).style.border = '1px solid #000000';
}



function klapp(){
  if(document.getElementById('klappbox').style) document.getElementById('klappbox').style.display='block';
}


function popupprofile(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'top=400,left=400,width=600,height=10');
return false;
}

