// JavaScript Document

var PathToSSD   = 'SSDLP/ImageURL/ImageWindow.html?Image=SSD.jpg&BC=cc&Per=85&SB=27&File=SophieSew_SetUp_1.03&Sub=SSSoftware';
var ConfigText  = 'height=100,width=100, top=40, left=40, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no';

var IntroText1 ='<CENTER><span class ="fontGeneva"><div class="size22 colWhite lineHeight1">What Is SophieSew ?</div><span class="colMainText position:absolute top:15px"><br>SophieSew is a new software design program that can be used in the digitizing and editing of machine embroidery. Written and developed by Carlos Mandell it is aimed at any one interested in trying out a new approach to embroidery design.</span></span><div id="LayerTest" ><img src="GalleryGraphics/EmbroideryProgramCrop.jpg"  /></div><span class ="fontGeneva"><span class="colMainText"><p>&nbsp;</p></p></span></span></span><CENTER>';

var IntroText2 = '<span class ="fontGeneva"><span class="size22 colWhite"><CENTER><div class="lineHeight">What SophieSew Offer ?</div></CENTER></span><br><span class="colMainText"><span class="myList"><li>Digitizing and editing functions that are fully integrated into its worksheet with easy switching between the the two modes.</li><br /><li>A Huge Worksheet that can be quickly set to any position by just dragging the mouse ( no awkward scroll bars to manage ).</li><br /><li>Worksheet magnification settings ranging from 10 to a massive 5000%, that can be quickly set using mouse wheel rotation.</li><br /><li> The ability to increase your creativity by having as many designs open on the worksheet as required.</li></span></span></span>';

var IntroText3 ='<CENTER><span class ="fontGeneva"><div class="size22 colWhite lineHeight">Digitizing And Images.</CENTER></div><span class="colMainText"><br>In SophieSew you use an image as a basis for constructing a framework of outlines giving shape to your embroidery designs.<br><br>Using SophieSew\'s Image tool you can import a picture ( jpeg or bmp format ) to any position on the worksheet.<br><br>Other things You can do Include :-<br><br><span class="myList"><li>You can drag them to any new position on the worksheet.</li><li>Magnify from 10 to 500% of original size.</li><li>Make them semi-transparent or even invisible.</li></span></span>';

var IntroText4 ='<span class ="fontGeneva"><div class="size22 colWhite lineHeight"><CENTER>Digitizing Tools: Outlines</CENTER></div><br><br><img  src="GalleryGraphics/Outline.gif" class="Image1" /><img src="GalleryGraphics/CreateDirect.gif" class="Image1" /><img src="GalleryGraphics/CreateColumn.gif" class="Image1" /><span class="colMainText style="text-align: justify;">SophieSew offers a range of simple yet powerful curving tools that allow you to quickly build a framework or outline around your embroidery design. Using these tools in conjunction an image object allows you to build as much or as little detail into your  design as required.<br><br><span class="myList"><li>SophieSew has poly-biezer functionality built into its outline and curved column tools to give superbly curved look to your embroidery stitching.</li></span></span></span>';

var IntroText5 = '<span class ="fontGeneva"><span class="size22 colWhite"><CENTER>Tapered Decorative Stitches.</CENTER></span><br /><br /><span class="colMainText"><CENTER>You can use SophieSew\'s built in shape editor to convert ordinary outline objects into beautifully tapered zigzag or satin stitches  that can easily be controlled on screen with just a few mouse clicks.</CENTER></span><div id="LayerTaper"><img src="GalleryGraphics/Taper2.gif" width="400" height="90" />';

var IntroText6 = '<span class ="fontGeneva"><div class="size22 colWhite"><CENTER>Outlines And Stitch Types</CENTER></div><br /><span class="colMainText">In SophieSew outlines can be easily converted to a range of embroidery stitch types. Simply Place the worksheet in edit mode. Left then right click an outline with the mouse and select properties from the drop down menu.<br /><img src="GalleryGraphics/OutlineStitchImagesTrans.gif" width="140" height="94" class="Image2" /><br />Basic stitch types include :-<br /><br /><span class="myList"><li>Running Stitch</li><li>Zigzag Stitch</li><li>Satin Stitch</li></span></span></span>';

var IntroText7 = '<span class ="fontGeneva"><div class="size22 colWhite lineHeight"><CENTER>Digitizing Tools: Filled Regions</CENTER></div><br /><br /><img  src="GalleryGraphics/Region.gif" class="Image1" /><span class="colMainText">In SophieSew you can use the region tool to give body to your embroidery designs. A few simple mouse clicks quickly allow you to define and fill an area of stitches using outlines as a boundary.<br /><br /><br /><span class="myList"><li>Because these filled regions are anchored directly to outlines, any changes in outline shape or position will cause an automatic updating of the underlying region to reflect the new filled area.</span></span></span>';

var IntroText8 = '<span class ="fontGeneva"><div class="size22 colWhite lineHeight"><CENTER>Regions And Stitch Types</CENTER></div><br /><span class="colMainText">In SophieSew regions can be converted to a range of embroidery fill stitch types.<br /><br />Simply place the worksheet in edit mode. Left then right click inside a filled area with the mouse and select<i> region properties</i> from the drop down menu.<br /><img src="GalleryGraphics/RegionStitchImagesTrans.gif" width="140" height="94" class="Image2" />Basic fill stitch types include :-<br /><br /><span class="myList"><li>Tatami Stitch</li><li> Zigzag Stitch</li><li> Satin Stitch.</li></span></span></span>';

var IntroText25 = '<span class ="fontGeneva"><div class="size22 colWhite lineHeight"><CENTER>Download A Copy</CENTER></div><br><span class="colMainText"><center>SophieSew is an integrated software design program that can be used in the digitizing and editing of machine embroidery. This software is at an early stage of development and as such still remains free to download and use.</center></span><div id="DownloadInfo"><table width="100%" border="0" cellpadding="0" cellspacing="0"  bgcolor="#C0C0C0" id="SSDTable"><tr><td>Title </td><td>SophieSew Ver 1.03</td></tr><tr><td width="28%">File Size </td><td width="72%">2.3 MB. </td></tr><tr><td>Platforms</td><td>Windows 95, 98, 2000, XP. </td></tr></table></div><div id="SSDownload"><img src="GalleryGraphics/SSDownloadThumb.gif" onclick="JCGotoSSDownload ();" onmouseover="SetOpacity ( \'SSDownload\', 9.99 );" onmouseout="SetOpacity ( \'SSDownload\', 8 );"/></div>';



var OverColor1  = "white";
var OverColor2  = "red";
var OverColorG  = "green";

var Block1Y = 512 + 11;
var Block2Y = 882 + 11;

var DisHeight  = 240;
var DisHeight1 = 248;

var BorderStyleDefault = new CustomBorder ( );
var NullBorder         = new CustomBorder ( );
var InsetBorder        = new CustomBorder ( );

var Interupting = false;

InsetBorder . Apply ( "inset", "", "" );
NullBorder  . Apply ( "", "", "0px" );

function JCGotoSSDownload ( )
{
  window.open ( PathToSSD +"&FT=" + "1000", 'newwindow', config=ConfigText );
	//return document.MM_returnValue;
}

function LoadPage ()
{
	
	
  Show2 . TimerExecute       ( 0 );
	Show4 . TimerExecute       ( 5 );
	//Show2 . Execute       (  );
}

function SetButtonMenu ()
{
	var Y      = 5;
	var XBase  = 14; 
	var XAdd   = 30 + 7;
	myMenu . Generate ();
	myMenu . SetBuffers ( 8 );
	myMenu . LogButton ( XBase               , Y, "BA.gif", "BAH.gif", "BAD.gif", "BAD.gif",30, 30, ClickResponseStart ,0 );
	myMenu . LogButton ( XBase + XAdd        , Y, "BL.gif", "BLH.gif", "BLDH.gif", "BLDH.gif",30, 30, ClickResponseBack ,0 );
	myMenu . LogButton ( XBase + ( XAdd * 2 ), Y, "P.gif", "PH.gif", "PD.gif", "PDH.gif",30, 30, ClickResponseStop ,myMenu_Switch | myMenu_Group | myMenu_AllAllowedUp );
	myMenu . LogButton ( XBase + ( XAdd * 3 ), Y, "BR.gif", "BRH.gif", "BRDH.gif", "BRDH.gif",30, 30, ClickResponseForward ,0 );
	
	myMenuA . Generate ();
	myMenuA . SetBuffers ( 8 );
	myMenuA . LogButton ( XBase               , Y, "BA.gif", "BAH.gif", "BAD.gif", "BAD.gif",30, 30, ClickResponseStartA ,0 );
	myMenuA . LogButton ( XBase + XAdd        , Y, "BL.gif", "BLH.gif", "BLDH.gif", "BLDH.gif",30, 30, ClickResponseBackA ,0 );
	myMenuA . LogButton ( XBase + ( XAdd * 2 ), Y, "P.gif", "PH.gif", "PD.gif", "PDH.gif",30, 30, ClickResponseStopA ,myMenu_Switch | myMenu_Group | myMenu_AllAllowedUp );
	myMenuA . LogButton ( XBase + ( XAdd * 3 ), Y, "BR.gif", "BRH.gif", "BRDH.gif", "BRDH.gif",30, 30, ClickResponseForwardA ,0 );
	
	XBase = XBase + 2;
	
	myMenuB . Generate ();	
	
	myMenuB . SetBuffers ( 8 );
	myMenuB . LogButton ( 16 + 2               , Y, "DL.gif", "DLH.gif", "DLDH.gif", "DLDH.gif",125, 30, ClickResponseDownload ,0 );
	myMenuB . LogButton ( 16 + 135        , Y, "DN.gif", "DNH.gif", "DNDH.gif", "DNDH.gif",91, 30, ClickResponseDonate ,0 );
	myMenuB . LogButton ( 16 + 238, Y, "BUp.gif", "BUpH.gif", "BupDH.gif", "BUpDH.gif",30, 30, ClickResponseToTop ,0 );
	
	//myMenuB . SetButtonOpacity ( 50 );
	SetLayersToImageDims  (  );
}

function ClickResponseForward ( ButtonNo, Status )
{
	if ( Interupting ) return;
	Show2 . Reset ();	
	Show2 . ImagePos = Show2 . ImagePos + 1;
	if ( Show2 . ImagePos >= Show2 . Paths . length ) Show2 . ImagePos = 0;
	Show2 . Execute ( Show2 . ImagePos );
}

function ClickResponseStop ( ButtonNo, Status )
{
	if  ( Status ) { Show2 . InterruptTimer ();  Interupting = true;  }
	else           { Show2 . RestartTimer   ();  Interupting = false; }	
}

function ClickResponseBack ()
{
	if ( Interupting ) return;
  Show2 . Reset ();	
	Show2 . ImagePos = Show2 . ImagePos - 1;
	if ( Show2 . ImagePos < 0 ) Show2 . ImagePos = Show2 . Paths . length - 1;
	Show2 . Execute ( Show2 . ImagePos );
}

function ClickResponseStart ()
{
	if ( Interupting ) return;
	Show2 . Reset ();	
	Show2 . Execute ( 0 );
}


function ClickResponseForwardA ( ButtonNo, Status )
{
	if ( Interupting ) return;
	Show4 . Reset ();	
	Show4 . ImagePos = Show4 . ImagePos + 1;
	if ( Show4 . ImagePos >= Show4 . Paths . length ) Show4 . ImagePos = 0;
	Show4 . Execute ( Show4 . ImagePos );
}

function ClickResponseStopA ( ButtonNo, Status )
{
	if  ( Status ) { Show4 . InterruptTimer ();  Interupting = true;  }
	else           { Show4 . RestartTimer   ();  Interupting = false; }	
}

function ClickResponseBackA ()
{
	if ( Interupting ) return;
  Show4 . Reset ();	
	Show4 . ImagePos = Show4 . ImagePos - 1;
	if ( Show4 . ImagePos < 0 ) Show4 . ImagePos = Show4 . Paths . length - 1;
	Show4 . Execute ( Show4 . ImagePos );
}

function ClickResponseStartA ()
{
	if ( Interupting ) return;
	Show4 . Reset ();	
	Show4 . Execute ( 0 );
}

function ClickResponseDownload ()
{
  window.open ( "SSDLP/Gallery.php", "_self", 'newwindow' );
}
	
function ClickResponseDonate ()
{
 window.open ( "SSDLP/Donate.html", "_self", 'newwindow' );
}

function ClickResponseToTop ()
{
  window . scrollTo ( 0, 0 );
}




function TriggerFunction ( Pos )
{
	//alert ( Pos );
	Show1 . Execute ( Pos );
}

function TriggerFunction1 ( Pos )
{
	//alert ( Pos );
	Show3 . Execute ( Pos );
}	

function JCGotoMail ( )
{
	location . href = 'mailto:CarlosMandell@SophieSew.Com';
}
	

function BodyLoad ()
{
	centerDiv('LayerMain'); 
	RegisterEvents ( "LayerBack1" );
	RegisterEvents ( "LayerBack2" );
	RegisterEvents ( "LayerNavBack" );
	RegisterEvents ( "LayerIntro" );
	RegisterEvents ( "LayerContactImage" );
	
	SetOpacity ( 'LayerCopywright' , 3.5 );
	
	Show1 . ImageDir = "GalleryGraphics/";
	
	
	Show1 . PreloadImages ( 0, 1 );
	Show1 . LogPath  ( 50, null, 160, DisHeight, "SantaImage3DT.gif", 15 ,NullBorder,  ShowFlags_Image );	
	Show1 . LogPath  ( 50, null, 160, DisHeight, "SpiderRaw.gif",           15 ,InsetBorder, ShowFlags_Image ); 	 
	Show1 . LogPath  ( 50, null, 160, DisHeight, "RawImageTool.gif",  15 ,InsetBorder, ShowFlags_Image ); 
	Show1 . LogPath  ( 50, null, 160, DisHeight, "DP3.gif",  15 ,InsetBorder, ShowFlags_Image );
	Show1 . LogPath  ( 50, null, 160, DisHeight, "Outline1.gif",  15 ,InsetBorder, ShowFlags_Image );
	Show1 . LogPath  ( 50, null, 160, DisHeight, "Taper1.gif", 15 ,InsetBorder,  ShowFlags_Image );
	Show1 . LogPath  ( 50, null, 160, DisHeight, "Regions1.gif", 15 ,InsetBorder,  ShowFlags_Image );  // regions 1	
	Show1 . LogPath  ( 50, null, 160, DisHeight, "Regions2.gif", 15 ,InsetBorder,  ShowFlags_Image );  // regions 2	
	
	Show1 . LogPath  ( 50, null, 160, DisHeight, "Girl3D1Trans.gif", 15 ,NullBorder,  ShowFlags_Image );
	
	
	
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText1, 10 ,NullBorder, ShowFlags_Text );	
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText2, 10 ,NullBorder, ShowFlags_Text );	
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText3, 10 ,NullBorder, ShowFlags_Text );
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText4, 10 ,NullBorder, ShowFlags_Text );
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText6, 10 ,NullBorder, ShowFlags_Text );
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText5, 10 ,NullBorder, ShowFlags_Text );
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText7, 10 ,NullBorder, ShowFlags_Text );  // regions 1
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText8, 10 ,NullBorder, ShowFlags_Text );  // regions 2
	
	Show2 . LogPath  ( 50, null, 470, DisHeight1, IntroText25, 10 ,NullBorder, ShowFlags_Text );
	
	
	Show2 . Trigger   = TriggerFunction;
	Show1 . Triggered = true;

  Show3 . ImageDir = "GalleryGraphics/";
	
	Show3 . LogPath  ( 50, null, 160, DisHeight, "Regions1.gif", 15 ,InsetBorder,  ShowFlags_Image );  // regions 1	
	Show3 . LogPath  ( 50, null, 160, DisHeight, "Regions2.gif", 15 ,InsetBorder,  ShowFlags_Image );  // regions 2	
	Show3 . PreloadImages ( 0, 1 );
	Show3 . LogPath  ( 50, null, 160, DisHeight, "SantaImage3DT.gif", 15 ,NullBorder,  ShowFlags_Image );	
	Show3 . LogPath  ( 50, null, 160, DisHeight, "SpiderRaw.gif",           15 ,InsetBorder, ShowFlags_Image ); 	 
	Show3 . LogPath  ( 50, null, 160, DisHeight, "RawImageTool.gif",  15 ,InsetBorder, ShowFlags_Image ); 
	Show3 . LogPath  ( 50, null, 160, DisHeight, "DP3.gif",  15 ,InsetBorder, ShowFlags_Image );
	Show3 . LogPath  ( 50, null, 160, DisHeight, "Outline1.gif",  15 ,InsetBorder, ShowFlags_Image );
	Show3 . LogPath  ( 50, null, 160, DisHeight, "Taper1.gif", 15 ,InsetBorder,  ShowFlags_Image );
	
	Show3 . LogPath  ( 50, null, 160, DisHeight, "Girl3D1Trans.gif", 15 ,NullBorder,  ShowFlags_Image );
	
	
	Show4 . LogPath  ( 50, null, 470, DisHeight1, IntroText7, 10 ,NullBorder, ShowFlags_Text );  // regions 1
	Show4 . LogPath  ( 50, null, 470, DisHeight1, IntroText8, 10 ,NullBorder, ShowFlags_Text );  // regions 2
	Show4 . LogPath  ( 50, null, 470, DisHeight1, IntroText1, 10 ,NullBorder, ShowFlags_Text );	
	Show4 . LogPath  ( 50, null, 470, DisHeight1, IntroText2, 10 ,NullBorder, ShowFlags_Text );	
	Show4 . LogPath  ( 50, null, 470, DisHeight1, IntroText3, 10 ,NullBorder, ShowFlags_Text );
	Show4 . LogPath  ( 50, null, 470, DisHeight1, IntroText4, 10 ,NullBorder, ShowFlags_Text );
	Show4 . LogPath  ( 50, null, 470, DisHeight1, IntroText6, 10 ,NullBorder, ShowFlags_Text );
	Show4 . LogPath  ( 50, null, 470, DisHeight1, IntroText5, 10 ,NullBorder, ShowFlags_Text );
	
	Show4 . LogPath  ( 50, null, 470, DisHeight, IntroText25, 10 ,NullBorder, ShowFlags_Text );

  Show4 . Trigger   = TriggerFunction1;
	Show3 . Triggered = true;


}

function ResetBackground ()
{
  SetOpacity ( "LayerBack1"   , 2.5 );
	SetOpacity ( "LayerBack2"   , 2.5 );
	SetOpacity ( "LayerNavBack", 2.5 );
	SetOpacity ( "LayerIntro", 2.5 );
	SetOpacity ( "LayerContactImage", 2.5 );
}

function JCGotoGallery ( Path )
{
  window.open ( "SSDLP/Gallery.php", "_self", 'newwindow' );
	//return document.MM_returnValue;
}

function JCOver ( Link, Color )
{

  var Obj = new GetJCObject ( Link );
	Obj.style.color=Color;
	Obj.style.cursor="pointer";
	//
}

function JCOut ( Link, Color )
{
  var Obj = new GetJCObject ( Link );
	Obj.style.color=Color;
}
