//<script>

/*
window.onerror = handleErrors
function handleErrors(){return true}
*/

//document.onload = fixCSS

/*
function getX(obj){
  return( obj.offsetParent==null ? obj.offsetLeft : obj.offsetLeft+getX(obj.offsetParent) );
}




function getY(obj){
  return( obj.offsetParent==null ? obj.offsetTop : obj.offsetTop+getY(obj.offsetParent) );
}*/

function getX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		do {
			curleft += obj.offsetLeft;
			/*curtop += obj.offsetTop;*/
		} while (obj = obj.offsetParent);

	}else if(obj.x)
        curleft += obj.x;
	return curleft;
}
/*
function getY(obj){
  return( obj.offsetParent==null ? obj.offsetTop : obj.offsetTop+getY(obj.offsetParent) );
}
*/
function getY(obj){
	var curtop = 0;
	if (obj.offsetParent) {
		do {
			/*curleft += obj.offsetLeft;*/
			curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);

	}else if(obj.y)
        curtop += obj.y;
	return curtop;
}

var curDM;
var tDM1
function doHide(){
var m = document.getElementById("Web_Submenu"+srv)
m.style.left = "-250px"
}

function donewuser(){
document.write( "<iframe name=newuser frameborder=0 width=1 height=1 id=newuser src=\"/webmaster/verifycode.asp?ref="+ escape(document.referrer) +"&dmy="+ (new Date()).getTime() +"&call=NewUser\"><\/iframe>" )
}

//-------- menu en inglés ---------//
var links_ar_1 = new Array(
"News & Press Releases|info.asp?menu=1",
"Specials & Promotions|info.asp?menu=2",
"Shows & Events|info.asp?menu=3",
"About Us|info.asp?menu=4"
//"About Our team|info.asp?menu=5",
//"Industry Links|info.asp?menu=6"
);
/*
var links_ar_2 = new Array(
"Product Overview|seufree.asp?menu=1", 
"Software Features|seufree.asp?menu=2", 
"Included Components|seufree.asp?menu=3", 
"Screenshots & Demos|seufree.asp?menu=4",
"Ready to Upgrade?|seufree.asp?menu=5"
);
*/

var links_ar_3 = new Array(
"Choose your Product|sestd.asp?menu=1",
/*"Product Line Overview|sestd.asp?menu=1",*/
 "<b style='color:rgb(225,72,87)'><i>Essentials</i></b> - Advanced Editing|sestd.asp?menu=2", 
 "<b style='color:rgb(145,49,223)'><i>Lite</i></b> - Auto-Digitizing|sestd.asp?menu=3",
 "<b style='color:rgb(47,151,83)'><i>Liberty</i></b> - Digitizing Plus|sestd.asp?menu=4",
 "Comparison Chart|sestd.asp?menu=5",
 "Photo Gallery|sestd.asp?menu=6",
 "Machine compatibility|Compatibility/default.asp",
 "System Requirements|sestd.asp?menu=8"
 );
 
 
var links_ar_4 = new Array(
"Learning Stitch Era|services.asp?menu=1",
"SE Web Services (SEWS)|services.asp?menu=2",
/*"Stitch ERA <b style='color:rgb(153,0,204)'><i>Standard</i></b>  Services|services.asp?menu=2",*/
/*"SE UNIVERSAL Technical Support|services.asp?menu=3" ,*/
"SE Technical Support|services.asp?menu=3",
/*"Study Cases|services.asp?menu=6",*/
"New Ideas from Users|services.asp?menu=4",
"Polls & Statistics|services.asp?menu=5"
);

var links_ar_5 = new Array(
"Local Sales Contact|getstitchera.asp?menu=1",
"On-Line Purchase|getstitchera.asp?menu=2"
);

var links_ar_6 = new Array(
"Site Map|sitemap.asp",	
"Subscribe our Mailing List|contact.asp?menu=2",			   
"Testimonials from Users|contact.asp?menu=3",
"Corporate Contact|contact.asp?menu=4",
"Become a Dealer|contact.asp?menu=5"
/*"Development Partners|contact.asp?menu=6"*/
);

var links_ar_7 = new Array(
"Private Area|partners.asp?menu=1",
"Advertise in Stitch Era Universal|partners.asp?menu=2",
"Reserved Area for Dealers|partners.asp?menu=3",
"Reserved Area for Agents|partners.asp?menu=4",
"Reserved for Administration|partners.asp?menu=5"
);

//-------- menu en inglés ---------//

//-------- menu en español ---------//
var s_links_ar_1 = new Array(
"Noticias & Prensa|esp/info.asp?menu=1",
"Ofertas y Promociones|esp/info.asp?menu=2",
"Shows & Eventos|esp/info.asp?menu=3",
"Acerca de Sierra|esp/info.asp?menu=4"
//"Nuestro Equipo|esp/info.asp?menu=5",
//"Links de la Industria|esp/info.asp?menu=6"
);
/*
var links_ar_2 = new Array(
"Product Overview|seufree.asp?menu=1", 
"Software Features|seufree.asp?menu=2", 
"Included Components|seufree.asp?menu=3", 
"Screenshots & Demos|seufree.asp?menu=4",
"Ready to Upgrade?|seufree.asp?menu=5"
);
*/

var s_links_ar_3 = new Array(
"Elija su producto|esp/sestd.asp?menu=1",
/*"Product Line Overview|sestd.asp?menu=1",*/
 "<b style='color:rgb(225,72,87)'><i>Essentials</i></b> - Editor Avanzado|esp/sestd.asp?menu=2", 
 "<b style='color:rgb(145,49,223)'><i>Lite</i></b> - Auto-Digitalizado|esp/sestd.asp?menu=3",
 "<b style='color:rgb(47,151,83)'><i>Liberty</i></b> - Digitalizado Plus|esp/sestd.asp?menu=4",
 "Tabla Comparativa|esp/sestd.asp?menu=5",
 "Galería de fotos|esp/sestd.asp?menu=6",
 "Compatibilidad con Maquinas|Compatibility/s_default.asp",
 "Requisitos del Sistema|esp/sestd.asp?menu=8"
 );
 
 
var s_links_ar_4 = new Array(
"Aprendiendo Stitch Era|esp/services.asp?menu=1",
"SE Servicios Web (SEWS)|esp/services.asp?menu=2",
/*"Stitch ERA <b style='color:rgb(153,0,204)'><i>Standard</i></b>  Services|services.asp?menu=2",*/
/*"SE UNIVERSAL Technical Support|services.asp?menu=3" ,*/
"SE Soporte Técnico|esp/services.asp?menu=3",
/*"Study Cases|services.asp?menu=6",*/
"Ideas de Usuarios|esp/services.asp?menu=4",
"Encuestas & Estadisticas|esp/services.asp?menu=5"
);

var s_links_ar_5 = new Array(
"Contacto de ventas|esp/getstitchera.asp?menu=1",
"Compra en línea|esp/getstitchera.asp?menu=2"
);

var s_links_ar_6 = new Array(
"Mapa del Sitio|esp/s_sitemap.asp",	
"Suscríbase|esp/contact.asp?menu=2",			   
"Testimonios de Usuarios|esp/contact.asp?menu=3",
"Contacto Corporativo|esp/contact.asp?menu=4",
"Conviertase en Distribuidor|esp/contact.asp?menu=5"
/*"Development Partners|contact.asp?menu=6"*/
);

var s_links_ar_7 = new Array(
"Area Privada|esp/partners.asp?menu=1",
"Anuncie en Stitch Era Universal|esp/partners.asp?menu=2",
"Area de Distribuidores|esp/partners.asp?menu=3",
"Area de Agentes|esp/partners.asp?menu=4",
"Area de Administracion|esp/partners.asp?menu=5"
);

//-------- menu en español ---------//


var srv = ""
var isspn = ""
var host_server = ""
if (document.URL.toLowerCase().indexOf("sierrainside")!=-1) host_server = "/sierrainside/ArielFerro/WebSites/stitch-era"
if (document.URL.toLowerCase().indexOf("esp/")!=-1) isspn="s_"

function DM(o,n)
{
    if (n>7) srv="_1"
    var m = document.getElementById("Web_Submenu"+srv)
    var h = ""
    
    ar = eval(isspn +"links_ar_"+n)
    
    for (var i=0; i<ar.length; i++)
    {
	    h += "<tr><td><a href=\""+ host_server +"/"+ ar[i].split("|")[1] +"\" class=WebMenuItem>"+ ar[i].split("|")[0] +"</a></td></tr>"
	    //h += "<tr><td><a href=\""+ host_server +""+ ar[i].split("|")[1] +"\" class=WebMenuItem>"+ ar[i].split("|")[0] +"</a></td></tr>"
    }
    m.innerHTML = "<table cellpadding=0 width=\"100%\" cellspacing=0 border=0  id=DropM OnMouseOut=\"tDM1 = setTimeout('doHide()',200);\" OnMouseOver=\"clearTimeout(tDM1)\">"+ h + "</table>"
    m.style.left = getX(o) +"px"
}

function fixCSS(){}

/*------------------------------------------------------------------------------------------------------------------------------*/
/*		FUNCIONES PARA LA PAGINA DE REGISTRATION																			*/
/*------------------------------------------------------------------------------------------------------------------------------*/


function makeForm(m){
for (var i=1; i<8; i++) {
	if (eval("document.getElementById('doForm"+i+"')")) 
		closeForm(i)		
}
eval("document.getElementById('doForm"+m+"').style.display='';");
eval("document.getElementById('BxForm"+m+"a').style.backgroundColor='rgb(255,248,221)';")
eval("document.getElementById('BxForm"+m+"b').style.backgroundColor='rgb(255,248,221)';")
eval("document.getElementById('BxForm"+m+"a').style.border='solid 1px rgb(255,224,119)';")
eval("document.getElementById('BxForm"+m+"b').style.border='solid 1px rgb(255,224,119)';")
eval("document.getElementById('BxForm"+m+"a').style.borderBottom='solid 0px transparent';")
eval("document.getElementById('BxForm"+m+"b').style.borderBottom='solid 0px transparent';")
eval("document.getElementById('BxForm"+m+"a').style.borderRight='solid 0px transparent';")
eval("document.getElementById('BxForm"+m+"b').style.borderLeft='solid 0px transparent';")
eval("document.getElementById('btnOpen"+m+"').style.display='none';")
eval("document.getElementById('btnClose"+m+"').style.display='';")
if (document.getElementById("ErrArrow")) {document.getElementById("ErrArrow").style.visibility="hidden";}
displaceFooter()
}
function closeForm(m){
eval("document.getElementById('doForm"+m+"').style.display='none';")
eval("document.getElementById('BxForm"+m+"a').style.borderWidth='0px';")				
eval("document.getElementById('BxForm"+m+"b').style.borderWidth='0px';")		
eval("document.getElementById('BxForm"+m+"a').style.backgroundColor='transparent';")				
eval("document.getElementById('BxForm"+m+"b').style.backgroundColor='transparent';")		
eval("document.getElementById('btnOpen"+m+"').style.display='';")
eval("document.getElementById('btnClose"+m+"').style.display='none';")
displaceFooter()
}
function displaceFooter(){
if (document.getElementById("CloseImg6") && document.getElementById("ImgFooter")) document.getElementById("CloseImg6").style.top = ( getY(document.getElementById("ImgFooter")) - 60 ) + "px"
//alert(1)
}
/*------------------------------------------------------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------------------------------------------------------*/
/*		FUNCIONES PARA LA PAGINA DE KNOWLEDGE																			*/
/*------------------------------------------------------------------------------------------------------------------------------*/
function SchMode(m){
switch (m) {
	case 1:	
		document.getElementById("SchPanel").innerHTML = document.getElementById("SchMode1").innerHTML;
		document.getElementById("Smode1").style.color="#ffffff";
		document.getElementById("Smode1").style.textDecoration="none";
		document.getElementById("Smode2").style.color="rgb(236,233,216)";
		document.getElementById("Smode2").style.textDecoration="underline";		
		break;
	case 2: 
		document.getElementById("SchPanel").innerHTML = document.getElementById("SchMode2").innerHTML;
		document.getElementById("Smode1").style.color="rgb(236,233,216)";
		document.getElementById("Smode1").style.textDecoration="underline";
		document.getElementById("Smode2").style.color="#ffffff";
		document.getElementById("Smode2").style.textDecoration="none";			
		break;
}
}
var curA = "";
function loadA(u){
curA = u;
document.getElementById("Aux2").src = curA;
}
function printA(){
if (curA.length>0)
	document.getElementById("Aux2").src = curA +"&print=1";
}
/*------------------------------------------------------------------------------------------------------------------------------*/


/*------------------------------------------------------------------------------------------------------------------------------*/
/*		FUNCIONES PARA LA PAGINA DE WISH LIST																			*/
/*------------------------------------------------------------------------------------------------------------------------------*/
function dropW(w,t){
for (var i=0; i<t; i++){
	eval("document.getElementById('W"+i+"').style.display='none';")
}
eval("document.getElementById('W"+w+"').style.display='';")
displaceFooter();
}
/*if (window.Event) {
	document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = getXY;
var pX, pY;
function getXY(e) {
pX = (window.Event) ? e.pageX : event.clientX;
pY = (window.Event) ? e.pageY : event.clientY;
}*/
function addNW(p){
//document.getElementById("newWish").style.left = pX+"px";
if (document.f1){
var s = document.f1.r_Product1;
for (var i=0; i<s.length; i++) {
	if (s[i].value==p) {
		s[i].selected=true;
		break;
	}
}
}
document.getElementById("newWish").style.left = "200px";
document.getElementById("newWish").style.top = "150px";
document.getElementById("newWish").style.display="";
}
/*------------------------------------------------------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------------------------------------------------------*/
/*		FUNCIONES PARA LA PAGINA DE ARTE DEL BORDADO																			*/
/*------------------------------------------------------------------------------------------------------------------------------*/
function doThumbView(ver){
var hm,tl = "";
var as = new Array();
hm = "<span></span>"
for (var i=0; i<art.length; i++) {
	var as = art[i].split(".")			
	tl = as[1];
	if (tl.indexOf(" - ")!=-1) {tl=(tl.split(" - "))[0]+"<br><small>"+ (tl.split(" - "))[1] +"</small>"}
	hm += "<a href=\"javascript:showArticle('"+as[0]+"','"+as[1]+"','"+as[2]+"',"+as[3]+",'"+as[4]+"', '"+ver+"');\" class=ABList ><DIV CLASS=TMB><img OnLoad='doSize(this,54)' class=abthumb src=\"http://www.embroideryoffice.com/kbase/sip/images/"+ as[0].substring(0,11) +"_6.gif\" vspace=3 border=0></DIV>"+tl+"</a> "
}
document.getElementById("ThumbView").innerHTML = hm;
}

function showArticle(art_id,art_title,art_category,art_complexity,art_date, ver){
var cx = doComplexity(art_complexity);
var art_pdf = art_id.split("-")
var lg3 = "EN";
if (lg=="_sp") lg3 = "SP"
if (parseInt(ver)>=8)
	art_pdf = art_pdf[0] +"-"+ lg3 +"-"+ art_pdf[1] +"-"+ art_pdf[2] +"-v8";
else
	art_pdf = art_pdf[0] +"-"+ lg3 +"-"+ art_pdf[1] +"-"+ art_pdf[2];
document.getElementById("ABView").innerHTML = "<OBJECT CLASSID=\"clsid:CA8A9780-280D-11CF-A24D-444553540000\" WIDTH=520 HEIGHT=900> "+
	"<PARAM NAME=SRC VALUE=\""+art_pdf+"\"><EMBED SRC=\"http://www.embroideryoffice.com/AB/"+art_id+"/"+lg2+"/"+art_pdf+".pdf\" HEIGHT=500 WIDTH=520> <NOEMBED> Your browser does not support embedded PDF files. Please, <a href=\""+art_pdf+"\" target=_blank>click here</a></NOEMBED> </EMBED></OBJECT> "
document.getElementById("Sum2").innerHTML = art_category+"<br>"+cx+"<br>"+art_date;
document.getElementById("PackTitle").innerHTML = art_id +": <i style='font-weight:normal'>"+ art_title +"</i>";
if (parseInt(ver)>=8) {
	document.getElementById("Det4").innerHTML = ""+		
		"<a href=\"http://www.embroideryoffice.com/AB/"+art_id+"/"+art_id+".zip\"><img src=\"http://www.embroideryoffice.com/kbase/sip/images/icon_zip.gif\" align=absmiddle hspace=4 border=0 vspace=2>ZIP</a><br>"+
		"<a href=\"http://www.embroideryoffice.com/AB/"+art_id+"/"+lg2+"/"+art_pdf+".pdf\"><img src=\"http://www.embroideryoffice.com/kbase/sip/images/icon_pdf.gif\" align=absmiddle hspace=4 border=0>PDF</a><br>";
}else{
	document.getElementById("Det4").innerHTML = ""+
		"<a href=\"http://www.embroideryoffice.com/AB/"+art_id+"/"+art_id+".exe\"><img src=\"http://www.embroideryoffice.com/kbase/sip/images/icon_exe.gif\" align=absmiddle hspace=4 border=0>EXE</a><br>"+
		"<a href=\"http://www.embroideryoffice.com/AB/"+art_id+"/"+art_id+".zip\"><img src=\"http://www.embroideryoffice.com/kbase/sip/images/icon_zip.gif\" align=absmiddle hspace=4 border=0 vspace=2>ZIP</a><br>"+
		"<a href=\"http://www.embroideryoffice.com/AB/"+art_id+"/"+lg2+"/"+art_pdf+".pdf\"><img src=\"http://www.embroideryoffice.com/kbase/sip/images/icon_pdf.gif\" align=absmiddle hspace=4 border=0>PDF</a><br>";
}
}
function doComplexity(a){
var c = "";
for (var i=1; i<=5; i++) {
	if (i<=a)
		c += "<b class=complexity1>*</b>&nbsp;"
	else
		c += "<b class=complexity2>*</b>&nbsp;"
}
return c;
}
function doPrint(){
parent["ABView"].focus()
parent["ABView"].print()
}
function doSize(obj,sz){
imh = obj.height;
imw = obj.width;
if (imh>sz || imw>sz) {
	if (imh>imw){	
		rl = imh / imw
		imw = parseInt( (imw * sz) / imh )
		imh = imw * rl
	}else if (imw>imh){	
		rl = imw / imh
		imh = parseInt( (imh * sz) / imw )
		imw = imh * rl
	}else if (imw==imh) {
		imh = sz		
		imw = sz
	}			
}	
obj.style.width = imw;
obj.style.height = imh;
var pdt = parseInt( (sz - imh) / 2 )
obj.style.marginTop = Math.abs(pdt) + "px";
obj.style.visibility='visible';
}
/*------------------------------------------------------------------------------------------------------------------------------*/

                        function dyniframesize(theiframe) {
                            var iframeids = [theiframe]
                            var getFFVersion = navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
                            var FFextraHeight = getFFVersion >= 0.1 ? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
                            var dyniframe = document.getElementById(theiframe)
                            if (dyniframe && !window.opera) {
                                dyniframe.style.display = "block"
                                if (dyniframe.contentDocument && dyniframe.contentDocument.body.offsetHeight) //ns6 syntax
                                    dyniframe.height = dyniframe.contentDocument.body.offsetHeight; //+ FFextraHeight;
                                else if (dyniframe.Document && dyniframe.Document.body.scrollHeight) //ie5+ syntax
                                    dyniframe.height = dyniframe.Document.body.scrollHeight;
                            }
                            /*if (document.getElementById(theiframe +"_Aux"))
                            	document.getElementById(theiframe +"_Aux").innerHTML = "<Span style=\"color:silver\" />&nbsp;"+ dyniframe.height +"&nbsp;</Span>";*/
                        }

/*------------------------------------------------------------------------------------------------------------------------------*/

function pop(url,name,width,height){
var pop = window.open(url,name,"noresize=no,scrollbars=yes,width="+width+",height="+height)
pop.focus();
}

function showPressR2(id) {
var p = "";
if (document.URL.toLowerCase().indexOf("/esp/s_")!=-1) p = "s_";
if (wn && wn.open && !wn.closed)
	wn.document.location.href= p +"eosc_whatsnew_search.asp?prID="+id;
else
	var wn = window.open( p +"srv_whatsnew_search.asp?prID="+id, "WhatsNew", "width=500,height=450,scrollbars=1" );
}

function doNewImageVerification(img,w,h){
var im = new Image();
im.src = "/imageVerification.asp?w="+w+"&h="+h+"&dmy="+(new Date()).getTime();
document.images[img].src = im.src;
//return false;
}