
//<!--
var wide,hi;
var pop=null;
var oldwide;
var oldhi;
function closepop()
{
 if (pop && !pop.closed && pop.open){
 			pop.close();
			pop=null;
 }
}
function popsize(w,h)
{
 if (w != oldwide || h != oldhi){
 closepop();
 }
}
function popwin_html(file,wide,hi,ident)
{
 popsize(wide,hi);
 var tvar = 'testing passing';
 if(wide==0)winwide=''
 else winwide='width='+(wide+28);
 if(hi==0)winhi=''
 else winhi='height='+(hi+30);
 if(ident==null || ident=='')ident='Image';
 
 pop=window.open(file,'pop_1','resizable=no,toolbar=no,scrollbars=no,menubar=no,'+winhi+','+winwide);
 if (pop.opener == null) {
  pop.opener = window; }
 pop.focus();
 oldwide=wide;
 oldhi=hi;
}
function popwin(image,wide,hi,ident)
{
 popsize(wide,hi);
 
 if(wide==0)winwide=''
 else winwide='width='+(wide+28);
 if(hi==0)winhi=''
 else winhi='height='+(hi+30);
 if(ident==null || ident=='')ident='Image';
 
 var s1 ='<html><head><title>'+ident+'</title></head>';
 var s15='';
 var s2 ='<body bgcolor="#000033"><table width="100%" align="center" cellspacing="0" cellpadding="0" border="0"><tr><td width="100%" align="center" valign="middle">';
 var s3 ='<img src="'+image+'" width="'+wide+'" height="'+hi+'" border="0"></td></tr></table></body></html>';
 
 pop=window.open('', 'pop_2','resizable=no,toolbar=no,scrollbars=no,menubar=no,'+winhi+','+winwide);
 pop.document.write(s1+s15+s2+s3);
 pop.document.close();
 pop.focus();
 oldwide=wide;
 oldhi=hi;
}
function popwin_admin(id,num,image,thumb,caption)
{
if (num == "") { 
  caption = document.piece_edit.new_title.value;
  mode = "edit_picture"; 
}
else mode = "edit_icon";
file = 'popup.php?id='+id+'&num='+num+'&popup='+image+'&thumb='+thumb+'&caption='+caption+'&mode='+mode;
window3=window.open(file,'iconWindow','scrollbars=yes,width=700,height=700');
}
function popwin_dynamic(image,wide,hi,ident)
{
 closepop();

 if(wide==0)winwide=''
 else winwide='width='+(wide+28);
 if(hi==0)winhi=''
 else winhi='height='+(hi+30);
 if(ident==null || ident=='')ident='Image';

file = 'popup.php?popup='+image+'&popup_width='+wide+'&popup_height='+hi;
pop=window.open(file,'popup','resizable=no,toolbar=no,scrollbars=no,menubar=no,'+winhi+','+winwide);
pop.focus();
}
function popwin_edit_text(mode, id, stock_number)
{
winwide='width='+640;
winhi='height='+380;

if(mode=='text') {
  winwide='width='+600+'';
  winhi='height='+200+'';
}
file = 'edit_text.php?mode='+mode+'&id='+id+'&stock_number='+stock_number;
//alert( stock_number );
text_window=window.open(file,'iconWindow','top=0,left=0,resizable=yes,status=yes,scrollbars=no,width=640,height=360');
text_window.focus();
}
function popwin_edit_popup(mode, id, stock_number)
{
winwide='width='+640;
winhi='height='+800;

if(mode=='text') {
  winwide='width='+600;
  winhi='height='+200;
}
file = 'edit_text.php?mode='+mode+'&id='+id+'&stock_number='+stock_number;
//alert( stock_number );
popup_window=window.open(file,'popupWindow','top=0,left=0,resizable=yes,status=yes,scrollbars=no,width=640,height=740');
popup_window.focus();
}
function email(whoTo,theSubject) {
  var whereTo = "dollsdolls.com";
  var theLink = "mailto";
  constructAdd = theLink+":"+whoTo+"@"+whereTo+"?subject="+theSubject;
  document.write("<a href=\""+constructAdd+"\">");
} 
//-->
