// <![CDATA[

//"'"+str.replace("\n","'+nl+'")+"'"
var nl = "\n";
function writeSoyQuickBox(){
	document.write('<table width="557" cellspacing="0" cellpadding="0" class="comptable" border="1" align="center">'+nl+'<tr>'+nl+'<th colspan="2" style="background-color: #72C122;">SoyQuick Automatic Soymilk Maker </th>'+nl+'</tr>'+nl+'<tr>'+nl+'<td width="276"><center>'+nl+'<a href="/ventasenlinea.html"><img src="/images/promotions/soymilk_specials.png" alt="Online Specials" width="190" height="30" border="0" vspace="5"/></a>'+nl+'</center>'+nl+'<ul>'+nl+'<li><strong>Award of excellence winner</strong></li>'+nl+'<li><strong>Easy to operate and clean</strong></li>'+nl+'<li><strong>Recommended by experts</strong></li>'+nl+'<li><strong>Fast 13 minute cycle</strong></li>'+nl+'<li><strong>High quality stainless steel design</strong></li>'+nl+'<li><strong>UL electrical and safety certified </strong></li>'+nl+'</ul></td>'+nl+'<td width="275" rowspan="3"><!--urls used in the movie-->'+nl+'<a href="http://www.maquinalechedesoya.com/soymilkmaker.html"></a>'+nl+'<!--text used in the movie-->'+nl+'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="275" height="200" id="soyquick" align="middle">'+nl+'<param name="allowScriptAccess" value="sameDomain" />'+nl+'<param name="movie" value="'+getDocumentPath()+'/swf/soyquick.swf" />'+nl+'<param name="quality" value="high" />'+nl+'<param name="bgcolor" value="#f1f7d4" /><param name="wmode" value="transparent">'+nl+'<embed src="'+getDocumentPath()+'/swf/soyquick.swf" quality="high" bgcolor="#f1f7d4" wmode="transparent" width="275" height="200" name="soyquick" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" /></embed>'+nl+'</object></td>'+nl+'</tr>'+nl+'<tr>'+nl+'<td align="center" class="large1">Make fresh organic milks for less than <br/>'+nl+'10 cents per quart, including soy milk, <br/>'+nl+'rice milk, almond milk, oat milk, nut <br />'+nl+'milks, and even fresh tofu.</td>'+nl+'</tr>'+nl+'</table>');
	
}
function displayFlashAdd(){
		if(document.getElementById("addBox1JuicerSwf") != null){
			displayJuicerFlash();
		}else if(document.getElementById("addBox1SoyquickSwf") != null){
			displaySoyquickFlash();
		}
}
function displayJuicerFlash(){
	var so1 = new SWFObject(getDocumentPath()+"/swf/magazine1-juicers.swf", "flashMagazine", "600", "184", "7", "");
	so1.addParam("allowScriptAccess", "sameDomain");
	so1.addParam("movie", getDocumentPath()+"/swf/magazine1-juicers.swf");
	so1.addParam("quality", "high");
	so1.addParam("bgcolor", "");
	so1.addParam("wmode", "transparent");
	so1.write("addBox1JuicerSwf");
}

function displaySoyquickFlash(){
	var so1 = new SWFObject(getDocumentPath()+"/swf/magazine1-soyquick.swf", "flashMagazine", "600", "184", "7", "");
	so1.addParam("allowScriptAccess", "sameDomain");
	so1.addParam("movie", getDocumentPath()+"/swf/magazine1-soyquick.swf");
	so1.addParam("quality", "high");
	so1.addParam("bgcolor", "");
	so1.addParam("wmode", "transparent");
	so1.write("addBox1SoyquickSwf");
}

function writeJuicersBox(){
	document.write('<table width="550" border="1" align="center" cellpadding="0" cellspacing="0" class="comptable" >'+nl+'  <tr>'+nl+'    <th colspan="2" style="background-color: #72C122;">Twin Gear Juicers</th>'+nl+'  </tr>'+nl+'  <tr>'+nl+'    <td width="285" rowspan="3">'+nl+'      <!--urls used in the movie-->'+nl+''+nl+'      <p><a href="http://www.maquinalechedesoya.com/extractordejugosgreenpower.html"></a> <a href="http://www.maquinalechedesoya.com/extractordejugostwinhealth.html"></a>'+nl+'          <!--text used in the movie-->'+nl+'          <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="285" height="200" align="middle">'+nl+'            <param name="allowScriptAccess" value="sameDomain" />'+nl+'            <param name="movie" value="'+getDocumentPath()+'/swf/juicers2.swf" />'+nl+'            <param name="quality" value="high" />'+nl+'            <param name="bgcolor" value="#f1f7d4" />'+nl+'			<param name="wmode" value="transparent">'+nl+'            <embed src="'+getDocumentPath()+'/swf/juicers2.swf" width="285" height="200" align="middle" quality="high" bgcolor="#f1f7d4" wmode="transparent" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" /></embed>'+nl+'          </object>'+nl+'          <br/>'+nl+'    </p></td>'+nl+'  </tr>'+nl+'  <tr>'+nl+'    <td><center>'+nl+'        <a href="/ventasenlinea.html"><img src="/images/promotions/juicer_specials.png" alt="Online Specials" width="130" height="30" border="0" vspace="5"/></a>'+nl+'      </center>'+nl+'        <ul>'+nl+'          <li class="style2">High Quality Twin Gear Juicers</li>'+nl+'          <li class="style2">Low RPM (for enzyme rich juice)</li>'+nl+'          <li class="style2">10 and 12 Year Warranties</li>'+nl+'          <li class="style2">Heavy Duty Motors</li>'+nl+'      </ul></td>'+nl+'  </tr>'+nl+'  <tr>'+nl+'    <td align="center">'+nl+'      <p class="style6 style7 style8 bold1 style3">Both juicers are excellent for juicing cranberries, along with other fruits, vegetables and wheat grass. Improve your diet and nutrition by order one of our quality twin gear juicers today. </p></td>'+nl+'  </tr>'+nl+'</table>');

}

function currentSpecial(){
	//checkForFirstTime("holidayspecials.asp");
}


function checkForFirstTime(goTo){
	var days_of_immunity = 28;
	var q_item 		= "nextPage";
	var c_name 		= "seen_it_"+goTo;
	var DOMAIN_URL	= "http://www.maquinalechedesoya.com/";
	var SCRIPTS	= "scripts";
	var DOMAIN 		= "soymilkquick.com";
	var CHARACTERS_TO_PATH 	= 17;
	if(readCookie(c_name) != null){
	 	//do nothing, if still has immunity
	}else{
		//check if cookies enabled, if so se the immunity and forward to ad
		createCookie("testifcookies","yes",1);
		if(readCookie("testifcookies")){
			var isFlashOk = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
			
			if(isFlashOk){
				createCookie(c_name,"yes",days_of_immunity)
				var loc = ""+window.location;
				loc = loc.substring((CHARACTERS_TO_PATH+loc.indexOf(DOMAIN)));
				if(loc.indexOf(SCRIPTS) != 0)
					window.location=DOMAIN_URL+goTo+"?"+q_item+"="+loc;
			}
		}
	}
}
// ]]>
