//auto generates by the storecreator and templates
var storeName='Zen Dynamics';
var mainPage='intro.html';
var totalItems=33;
var ir = new Array(totalItems);
var mAlignStr='<Center>';
A(0, 'AV-KA-IS', 'Kaspersky® Internet Security 2009', 0.00, 'Anti Virus');
A(1, 'MSO-07-HS', 'Microsoft® Office 2007 Home & Student Edition', 0.00, 'Office Software');
A(2, 'MSSERV-WEB-03', 'Microsoft® Windows Server 2003 Web Server Edition 32 Bit', 0.00, 'Server OS');
A(3, 'XP-H', 'Microsoft® Windows XP Home Edition ', 0.00, 'Desktop OS');
A(4, 'PAS-INV', 'Pastel Invoicing', 0.00, 'Accounting');
A(5, 'WS-ST', 'STANDARD DESKTOP COMPUTER', 0.00, 'Desktop SystemsHard Disk1: 160GB SATA II (SATA2) Plus (3Gbps) With 16MB Cache2: 250GB SATA II (SATA2) Plus (3Gbps) With 16MB Cache3: 500GB SATA II (SATA2) Plus (3Gbps) With 32MB CacheMemory1: 1GB DDR2-800 High-Performance  240-Pin Module2: 2GB DDR2-800 High-Performance  240-Pin Module3: 4GB DDR2-800 High-Performance  240-Pin ModuleProcessor1: Intel® Pentium® Dual-Core Processor - 2.00GHz, 1MB Cache, 800MHz FSB2: Intel® Pentium® Dual-Core Processor - 2.20GHz, 1MB Cache, 800MHz FSB3: Intel® Pentium® Dual-Core Processor - 2.40GHz, 1MB Cache, 800MHz FSB4: Intel® Core2™ Duo Processor - 2.40GHz, 2MB Cache, 800MHz FSB5: Intel® Core2™ Duo Processor - 2.60GHz, 2MB Cache, 800MHz FSBSoftware1: No Operating System installed2: Microsoft® Windows XP Home Edition Incl. SP 33: Microsoft® Windows XP Professional Incl. SP 34: Microsoft® Windows Vista Home Basic Edition5: Microsoft® Windows Vista Home Premium Edition6: Microsoft® Windows Vista BusinessEdition7: Microsoft® Windows Vista Ultimate Edition');
A(6, 'WS-AD', 'ADVANCED DESKTOP COMPUTER', 0.00, 'Desktop SystemsHard Disk1: 160GB SATA II (SATA2) Plus (3Gbps) With 16MB Cache2: 250GB SATA II (SATA2) Plus (3Gbps) With 16MB Cache3: 500GB SATA II (SATA2) Plus (3Gbps) With 32MB CacheMemory1: 1GB DDR2-800 High-Performance  240-Pin Module2: 2GB DDR2-800 High-Performance  240-Pin Module3: 4GB DDR2-800 High-Performance  240-Pin ModuleProcessor1: Intel® Core2™Duo Processor - 2.53GHz 3MB, 1066MHz FSB2: Intel® Core2™Duo Processor - 2.66GHz 6MB, 1333MHz FSB3: Intel® Core2™Duo Processor - 3.00GHz 6MB, 1333MHz FSB4: Intel® Core2™Duo Processor - 3.16GHz 6MB, 1333MHz FSB5: Intel® Core2™Quad Processor - 2.40GHz 8MB, 1066MHz FSB6: Intel® Core2™Quad Processor - 2.66GHz 8MB, 1066MHz FSB7: Intel® Core2™Quad Processor - 2.50GHz 6MB, 1333MHz FSBSoftware1: No Operating System installed2: Microsoft® Windows XP Home Edition Incl. SP 33: Microsoft® Windows XP Professional Incl. SP 34: Microsoft® Windows Vista Home Basic Edition5: Microsoft® Windows Vista Home Premium Edition6: Microsoft® Windows Vista BusinessEdition7: Microsoft® Windows Vista Ultimate Edition');
A(7, 'AV-KA-AV', 'Kaspersky® Anti-Virus 2009', 0.00, 'Anti Virus');
A(8, 'MSO-07-BE', 'Microsoft® Office 2007 Basic Edition', 0.00, 'Office Software');
A(9, 'MSSERV-STD-03-32', 'Microsoft® Windows Server 2003 Standard Edition 32 Bit', 0.00, 'Server OS');
A(10, 'XP-P', 'Microsoft® Windows XP Professional ', 0.00, 'Desktop OS');
A(11, 'PAS-MB', 'Pastel My Business', 0.00, 'Accounting');
A(12, 'WS-EX', 'EXCLUSIVE  DESKTOP COMPUTER (GAMING PC)', 0.00, 'Desktop SystemsGraphic Card1: NVIDIA® GeForce 8500GT, 256MB GDDR3 128Bit2: NVIDIA® GeForce 9600GT, 512MB GDDR3 256Bit3: ATI® Radeon HD4850, 512MB GDDR3 256Bit, Crossfire SupportHard Disk1: 160GB SATA II (SATA2) Plus (3Gbps) With 16MB Cache2: 250GB SATA II (SATA2) Plus (3Gbps) With 16MB Cache3: 500GB SATA II (SATA2) Plus (3Gbps) With 32MB CacheMemory1: 2GB DDR2-800 High-Performance  240-Pin Module2: 4GB DDR2-800 High-Performance  240-Pin ModuleProcessor1: Intel® Core2™Duo Processor - 2.53GHz 3MB, 1066MHz FSB2: Intel® Core2™Duo Processor - 2.66GHz 6MB, 1333MHz FSB3: Intel® Core2™Duo Processor - 3.00GHz 6MB, 1333MHz FSB4: Intel® Core2™Duo Processor - 3.16GHz 6MB, 1333MHz FSB5: Intel® Core2™Quad Processor - 2.40GHz 8MB, 1066MHz FSB6: Intel® Core2™Quad Processor - 2.66GHz 8MB, 1066MHz FSB7: Intel® Core2™Quad Processor - 2.50GHz 6MB, 1333MHz FSBSoftware1: No Operating System installed2: Microsoft® Windows XP Home Edition Incl. SP 33: Microsoft® Windows XP Professional Incl. SP 34: Microsoft® Windows Vista Home Basic Edition5: Microsoft® Windows Vista Home Premium Edition6: Microsoft® Windows Vista BusinessEdition7: Microsoft® Windows Vista Ultimate Edition');
A(13, 'AV-KA-MS', 'Kaspersky® Mobile Security', 0.00, 'Anti Virus');
A(14, 'MSO-07-SBS', 'Microsoft® Office 2007 Small Business Edition', 0.00, 'Office Software');
A(15, 'MSSERV-STD-03-64', 'Microsoft® Windows Server 2003 Standard Edition 64 Bit', 0.00, 'Server OS');
A(16, 'VISTA-HB', 'Microsoft® Windows Vista Home Basic Edition', 0.00, 'Desktop OS');
A(17, 'PAS-XPS', 'Pastel Xpress', 0.00, 'Accounting');
A(18, 'AV-KA-WS', 'Kaspersky® Work Space Security', 0.00, 'Anti Virus');
A(19, 'MSSERV-CAL5-03', 'Microsoft® 5 Pack Client Access License 2003', 0.00, 'Server OS');
A(20, 'MSO-07-PE', 'Microsoft® Office 2007 Professional Edition', 0.00, 'Office Software');
A(21, 'VISTA-P', 'Microsoft® Windows Vista Home Premium Edition', 0.00, 'Desktop OS');
A(22, 'PAS-P', 'Pastel Partner', 0.00, 'Accounting');
A(23, 'AV-KA-BS', 'Kaspersky® Business Space Security', 0.00, 'Anti Virus');
A(24, 'MSSERV-STD-08', 'Microsoft® Windows Server 2008 Standard Edition 32/64 Bit', 0.00, 'Server OS');
A(25, 'VISTA-BE', 'Microsoft® Windows Vista Business Edition', 0.00, 'Desktop OS');
A(26, 'AV-KA-ES', 'Kaspersky® Enterprise Space Security', 0.00, 'Anti Virus');
A(27, 'MSSERV-CAL5-08', 'Microsoft® 5 Pack Client Access License 2008', 0.00, 'Server OS');
A(28, 'VISTA-UE', 'Microsoft® Windows Vista Ultimate Edition', 0.00, 'Desktop OS');
A(29, 'AV-KA-TS', 'Kaspersky® Total Space Security ', 0.00, 'Anti Virus');
A(30, 'MSSERV-SBS-03-STD', 'Microsoft® Windows Small Business Server 2003 Standard 32 Bit', 0.00, 'Server OS');
A(31, 'MSSERV-SBS-03-PREM', 'Microsoft® Windows Small Business Server 2003 Premium 32 Bit', 0.00, 'Server OS');
A(32, 'MSSERV-SBS-CAL5-03', 'Microsoft® 5 Pack Client Access License SBS 2003', 0.00, 'Server OS');
var disFont = "<font face='Arial, Helvetica, sans-serif'>";
var andSearch = 1;
function A(i, id, s, p, c)
{
	ir[i] = new RECORD();
	ir[i].itemID = id; 
	ir[i].catalog=c;
	ir[i].itemName = s; 
	ir[i].price = p;
}

function MakeArray(n) {
      this.length = n;
      for(var i = 0; i < n; i++){
            this[i] = 0;
      }
      return this;
}

function Currency(money)
{
	money =  parseFloat(money);
	money += 0.005;
	money +=  "";           
	var monLen = money.length;
	var digPos = money.indexOf(".");
	if(digPos == -1) {
		if (money <=0) {
			money ="0.00";
		} else {
			money += ".00";
		}
		return money;
	} else {
		if (digPos + 3 > monLen) {
			money += "0";
		} else if (digPos + 3 != monLen) {
			money = money.substring(0, digPos+3);
		} 
		return money;
	}     
}
function RECORD()
{
	this.itemID = 0;
	this.itemName="";
	this.price=0;
	this.match=0;
	this.catalog="";
	return this;
}



function CompareMatch(a, b) {
   return a.match < b.match;
}

function Search()
{
	Search_Start(parent.frames["cart"].document.forms[0]);
}

function NewSearch(theForm)
{
	Search_Start(theForm);
}


function Search_Start(theForm)
{
	var searchStr = theForm.keywords.value;
     searchStr=searchStr.toLowerCase();
	var space = " ";
	var searchWords = searchStr.split(space);

	searchWords.sort();
	var searchStart =0;

	
	for (var i=0; i < searchWords.length; i++) {
		if (searchWords[i].length == 0) {
			searchStart++;
		} else {
			break;
		}
	}
	var totalSearchWord = searchWords.length - searchStart;
	if (totalSearchWord <= 0) {
		return;
	}
	var totalFound=0;
	var j;

	for (j=0;j<totalItems;j++) {
		var totalMatch=0;
		var str = ir[j].itemName.toLowerCase();
		var sid=ir[j].itemID.toLowerCase();
		var c= ir[j].catalog.toLowerCase();
		for (var i=searchStart; i < searchWords.length; i++) {
			if (str.search(searchWords[i])>=0) totalMatch++; 
			else 
			if (c.search(searchWords[i])>=0) totalMatch++; 
			else 
			if (sid.search(searchWords[i])>=0) totalMatch++; 
		}
		if (andSearch) {
			if (totalMatch != searchWords.length - searchStart) {
				totalMatch=0;
			}
		} 
		if (totalMatch>0) totalFound++;
		ir[j].match=totalMatch;
	}
	ir.sort(CompareMatch);
	
	var cWin=parent.frames["shop"].document;
	







	cWin.open();
	cWin.write("<HTML><HEAD><TITLE>e-portal v5.x Shopping Cart Viewer</TITLE></HEAD>");
	cWin.write("<BODY LEFTMARGIN=2 BACKGROUND='"+parent.mCartBGImage+"' Text='"+parent.mCartText+"' BGCOLOR='"+parent.mCartBGColor+"' LINK='"+parent.mCartALink+"' VLINK='"+parent.mCartLink+"'  ALINK='"+parent.mCartALink+"' valign=top>");
	cWin.write(" "+mAlignStr+"<TABLE width=970 bgcolor=#F4DE85 height=100% border=0 CELLSPACING=0 CELLPADDING=0>");
	
	cWin.write("<tr><td width=970 height=40><center><br><Strong><font face=verdana color=#000000>"+disFont+"Search results are as shown in the following table<br><br>Your search has found &nbsp;["+totalFound+"] &nbsp; items</strong><br><br></td></tr>");
	cWin.write("<tr><td align=center valign=top width=970>");
	cWin.write("<TABLE width=90% border=1 bordercolor=#000000 CELLSPACING=0 CELLPADDING=0>");
	cWin.write("<tr bgcolor='"+parent.mCartTableHeaderBGColor+"'><td height=25 width=10%><b><font size=2 color='"+parent.mCartTableHeaderColor+"'>"+disFont+"<center>Match#</center></td><td width=15% height=25><b><font face=verdana size=2 color='"+parent.mCartTableHeaderColor+"'>"+disFont+"<center>ItemID</center></td><td width=65% height=25><b><font face=verdana size=2 color='"+parent.mCartTableHeaderColor+"'>"+disFont+"<center>Item Name</center></td><td width=10% height=25><b><font face=verdana size=2 color='"+parent.mCartTableHeaderColor+"'>"+disFont+"<center>Price</center></td></tr>");
	for (j=0;j<ir.length;j++) {
		if (ir[j].match>0) {
			cWin.write("<tr bgcolor='"+parent.mCartTableBodyBGColor+"'><td height=25 valign=top><font face=verdana size=2 color='"+parent.mCartTableBodyColor+"'>"+disFont+"<center>"+ir[j].match+"</td><td height=25 valign=top><font face=verdana size=2 color='"+parent.mCartTableBodyColor+"'>"+disFont+"<left>"+ir[j].itemID+"</td><td height=25 valign=top><font face=verdana size=2 color='"+parent.mCartTableBodyColor+"'>"+disFont+"<left><a href='item"+ir[j].itemID.toLowerCase()+".html'  target=shop>"+ir[j].itemName+"</a></td><td height=25 align=right><font face=verdana size=2 color='"+parent.mCartTableBodyColor+"'>"+disFont+"<right>"+Currency(ir[j].price)+"</td></tr>");
		}
	}
	cWin.write("</table></td></tr></table></body></html>");
	cWin.close();	
}


function PrintSearchPage()
{
	var cWin=parent.frames["shop"].document;
	cWin.open();
	cWin.write("<HTML><HEAD><TITLE> e-portal v5.x Shopping Cart Viewer</TITLE></HEAD>");
	cWin.write("<BODY Text=#000000 BGCOLOR=#2D3035 LINK=#000000 VLINK=#000000 alink=#000000 valign=top OnLoad='document.forms[0].elements[0].focus()'>");
	cWin.write("<table border=0> <tr><td><a href='"+mainPage+"'>"+disFont+"<Strong>Main Page</strong></a></td><td>"+disFont+"<a href='"+parent.returnHtmlPath+"'><Strong>Back</strong></a></td></tr></table><hr size=1 width=50%>");
	cWin.write("<input type=button size=40 value='Submit' onClick='parent.frames[\"cart\"].Search()'>");
	cWin.write("</form></td></tr></table>");
	cWin.write("</body></html>");
	cWin.close();	
}


//===============================================================================================================================================
// Last Upgrade: 8 July 2007
//===============================================================================================================================================