					
var x=0;
var y=0;


function expandIt(BlockName) {
			img = eval('document.img_'+BlockName);
			x=img.src;
			
			if (document.getElementById(BlockName).style.display == "block") {
				document.getElementById(BlockName).style.display = "none";
				if (x.substring(x.length-8,x.length) == "down.gif") img.src = "images/yan_menu/arrow.gif";
				else  img.src = "images/yan_menu/arrow.gif"
			} else {
				document.getElementById(BlockName).style.display = "block";
				if (x.substring(x.length-6,x.length) == "up.gif") img.src = "images/yan_menu/arrow.gif";
				else img.src = "images/yan_menu/arrow.gif";
			}
								}
		
function degis1(DOMEvent){ 
	var parentID;
	if (document.all) { document.getElementById = document.all; parentID = DOMEvent; }
	else { parentID = DOMEvent.target.id; }
		 
	var parentImage = document.getElementById (parentID);
	parentImage.src = "images/yan_menu/arrow.gif"

	  return true;
                            }

function degis2(DOMEvent){ 
	var parentID;
	
	if (document.all) { document.getElementById = document.all; parentID = DOMEvent; }
	else { parentID = DOMEvent.target.id; }
		 
var parentImage = document.getElementById (parentID);
parentImage.src = "images/yan_menu/arrow.gif"

	  return true;
                             }
							 

/////////////////////////////////////////////////////////////////////////////////////////////////
//MENU 1 SOL

function menu1_ust(baslik){
document.write('<table width="175" border="0" cellpadding="0" cellspacing="0">'+
'<tr><td colspan="2" width="25"><img src="images/yan_menu/menu1_ustsol1.gif"></td>'+
'<td width="149" height="22" align="center" background="images/yan_menu/menu1_ustbg1.gif" class="title">'+
'<strong>'+baslik+'</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>'+
'<td width="1" background="images/yan_menu/menu1_border1.gif"></td></tr>');
							}


function menu1_1_ust(baslik){

document.write('<table width="175" border="0" cellpadding="0" cellspacing="0">'+
'<tr>'+
'<td width="5"  class="title"   background="images/yan_menu/menu1_ustbg1.gif"><img src="images/yan_menu/menu1_ustsol1_1.gif"></td>'+
'<td  align="center" width="175" background="images/yan_menu/menu1_ustbg1.gif" class="title"><strong>'+baslik+'</strong>&nbsp;&nbsp;</td>'+
'<td width="1" background="images/yan_menu/menu1_border1.gif"></td>'+
'</tr>'+
'<tr>'+
'<td height="20" colspan="3">'+
'<table width="100%" border="0" cellpadding="0" cellspacing="0">'+
'<tr>'+
'<td width="5" height="20" background="images/yan_menu/menu1_solborder1.gif"></td>'+
'<td width="2" ></td>'+
'<td>');
							}


function menu1_1_alt(){

document.write('</td>'+
'<td width="1"  background="images/yan_menu/menu1_border1.gif"></td>'+
'</tr>'+
'</table>'+
'</td>'+
'</tr>'+
'<tr>'+
'<td colspan="3">'+
'<table cellpadding="0" cellspacing="0" width="100%">'+
'<tr>'+
'<td ><img src="images/yan_menu/menu1_sol_alt1.gif"></td>'+
'<td width="160" background="images/yan_menu/menu1_alt1.gif"></td>'+
'<td><img src="images/yan_menu/menu1_sag_alt1.gif"></td>'+
'</tr>'+
'</table>'+
'</td>'+
'</tr>'+
'</table>');
					}
					


function menu1_ust_bosluk(){
document.write('<tr>'+
'<td height="4" width="5" background="images/yan_menu/menu1_solborder1.gif"></td>'+
'<td align="center" valign="top" width="10" colspan="2"></td>'+
'<td background="images/yan_menu/menu1_border1.gif"></td></tr>');
							}




							
function menu1_alt(){
document.write('<tr>'+
'<td colspan="2"><img src="images/yan_menu/menu1_sol_alt1.gif"></td>'+
'<td background="images/yan_menu/menu1_alt1.gif"></td>'+
'<td ><img src="images/yan_menu/menu1_sag_alt1.gif"></td>'+
'</tr>');
/*
  <tr>
    <td colspan="2"><img src="images/yan_menu/menu1_sol_alt1_1.gif"></td>
    <td background="images/yan_menu/menu1_alt1_1.gif"></td>
    <td ><img src="images/yan_menu/menu1_sag_alt1_1.gif"></td>
  </tr>
--> 
*/
document.write('</table>'); 
					}

												 
function menu1_Yaz1(isim,durum)
{
x = x + 1;

var display = "";
if(durum){  display = "block";		}
else{		display = "none";		} 

document.write('<tr>'+
'<td height="20" width="5" background="images/yan_menu/menu1_solborder1.gif"></td>'+
'<td align="center" valign="top"><IMG  src="images/yan_menu/arrow.gif"  align=absMiddle border=0 name=img_block'+x+'></td>'+
'<td valign="top">'+
'<P class=b01><A class="sol_menu" onClick="javascript:expandIt(\'block'+x+'\');return false;" href="#">'+isim+'</A></P>'+
'<DIV><IMG height=3 src="images/yan_menu/hr01.gif" width=137 border=0></DIV>'+		
'<DIV style="DISPLAY:'+display+';" id="block'+x+'" >');
}


function menu1_Yaz2(isim,id)
{
y = y+1;
document.write('<P class=b02><A class="sol_menu" href="index.php?catId='+id+'">'+isim+'</A></P>'+
'<DIV><IMG height=3 src="images/yan_menu/hr01_1.gif" width=137 border=0></DIV>');		
}


function menu1_Yaz3(){
document.write('</DIV></td><td background="images/yan_menu/menu1_border1.gif"></td></tr>');
				}


function menu1_Yaz4(isim,url,popup)
{
x = x + 1;

var po;
if(popup==1){	po = "_blank";    }
else{  		po = "_self"; }

document.write('<tr>'+
'<td height="20" width="5" background="images/yan_menu/menu1_solborder1.gif"></td>'+
'<td align="center" valign="top"><IMG  src="images/yan_menu/arrow.gif"  align=absMiddle border=0 name=img_block'+x+'></td>'+
'<td valign="top">'+
'<P class=b01><A target="'+po+'" class="sol_menu"  href="'+url+'">'+isim+'</A></P>'+
'<DIV><IMG height=3 src="images/yan_menu/hr01.gif" width=137 border=0></DIV></td>'+
'<td background="images/yan_menu/menu1_border1.gif"></td></tr>');
}

//MENU1 SOOON

//////////////////////////////////////////////////////////////////////////////////////

//MENU 2

function menu2_ust(baslik){
document.write('<table width="175" border="0"  cellpadding="0" cellspacing="0">'+
'<tr><td  width="1" background="images/yan_menu/menu1_border1.gif"></td>'+  
'<td width="149" height="22" align="center" background="images/yan_menu/menu1_ustbg2.gif" class="title">'+
'<strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+baslik+'</strong>'+
'</td><td width="25" colspan="2" ><img src="images/yan_menu/menu1_sag_ust1.gif"></td></tr>');
							}

					
function menu2_2_ust(baslik){

document.write('<table width="175" border="0" cellpadding="0" cellspacing="0">'+
'<tr>'+
'<td width="1" background="images/yan_menu/menu1_border1.gif"></td>'+
'<td  align="center" width="175" background="images/yan_menu/menu1_ustbg2.gif" class="title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>'+baslik+'</strong></td>'+
'<td width="5"  class="title"  align="right"  background="images/yan_menu/menu1_ustbg2.gif"><img src="images/yan_menu/menu1_sag_ust1.gif"></td>'+
'</tr>'+
'<tr>'+
'<td height="20" colspan="3">'+
'<table width="175" border="0" cellpadding="0" cellspacing="0">'+
'<tr>'+
'<td height="20" width="1" background="images/yan_menu/menu1_border1.gif"></td>'+
'<td width="2" ></td>'+
'<td>');
				
							}							

function menu2_2_alt(){

document.write('</td>'+
'<td width="4" background="images/yan_menu/menu1_sagborder1.gif"></td>'+
'</tr>'+
'</table>'+
'</td>'+
'</tr>'+
'<tr> '+
'<td colspan="3">'+
'<table cellpadding="0" cellspacing="0" width="100%">'+
'<tr>'+
'<td><img src="images/yan_menu/menu1_sag_alt1.gif"></td>'+
'<td width="160" background="images/yan_menu/menu1_alt1.gif"></td>'+
'<td ><img src="images/yan_menu/menu1_sag_alt2.gif"></td>'+			
'</tr>'+
'</table>'+
'</td>'+
'</tr>'+
'</table>');
						}


function menu2_ust_bosluk(){
document.write('<tr>'+
'<td height="4" width="1" background="images/yan_menu/menu1_border1.gif"></td>'+
'<td valign="top" colspan="2"><td width="4" background="images/yan_menu/menu1_sagborder1.gif"></td></tr>');
							}					
								
function menu2_alt(){
document.write('<tr><td width="1" valign="top"><img src="images/yan_menu/menu1_border1.gif" height="7" width="1"></td>'+
'<td background="images/yan_menu/menu1_alt1.gif"></td>'+
'<td colspan="2" ><img src="images/yan_menu/menu1_sag_alt2.gif"></td>'+
'</tr></table>');
					}

function menu2_Yaz1(isim,durum)
{
x = x + 1;
var display = "";
if(durum){  display = "block";		}
else{		display = "none";		} 

document.write('<tr>'+
'<td height="20" width="1" background="images/yan_menu/menu1_border1.gif"></td>'+
'<td valign="top"><P class=b01>&nbsp; <IMG  src="images/yan_menu/arrow.gif"  align=absMiddle border=0 name=img_block'+x+'>'+
'&nbsp; <A class="sol_menu" onClick="javascript:expandIt(\'block'+x+'\');return false;" href="#">'+isim+'</A></P>'+
'<DIV><IMG height=3 src="images/yan_menu/hr01.gif" width=137 border=0></DIV>'+		
'<DIV style="DISPLAY:'+display+';" id="block'+x+'" >');
}	

function menu2_Yaz2(isim,id)
{
y = y+1;
document.write('<P class=b02><A class="sol_menu"  href="index.php?catId='+id+'">&nbsp; &nbsp; &nbsp;'+isim+'</A></P>'+
'<DIV><IMG height=3 src="images/yan_menu/hr01_1.gif" width=137 border=0></DIV>');		
}

function menu2_Yaz3(){
document.write('</DIV></td><td width="21"></td><td width="4" background="images/yan_menu/menu1_sagborder1.gif"></td></tr>');
				}			



function menu2_Yaz4(isim,url,popup)
{
x = x + 1;

var po;
if(popup==1){	po = "_blank";    }
else{  		po = "_self"; }

document.write('<tr>'+
'<td height="20" width="1" background="images/yan_menu/menu1_border1.gif"></td>'+
'<td valign="top"><P class=b01>&nbsp; <IMG  src="images/yan_menu/arrow.gif"  align=absMiddle border=0 name=img_block'+x+'>'+
'&nbsp; <A target="'+po+'" class="sol_menu" href="'+url+'">'+isim+'</A></P>'+
'<DIV><IMG height=3 src="images/yan_menu/hr01.gif" width=137 border=0></DIV>'+		
'</td><td width="21"></td><td width="4" background="images/yan_menu/menu1_sagborder1.gif"></td></tr>');
}		




function listeleme1(id,isim,resim,satis_fiyati,birim,kdv){

if(resim!="resim_yok.jpg"){
	var b_resim = resim.substr(2);
						  }
						  
document.write('<td width="30%" align="center">');

document.write('<table width="100%" height="100" border="0" cellpadding="0" cellspacing="0">'+
'<tr>'+
'<td width="6" height="7"><img src="images/listeleme/menu1_solust.gif" ></td>'+
'         <td width="15"><img src="images/listeleme/menu1_ust.gif"  width="15" height="7" ></td>'+
'          <td background="images/listeleme/menu1_ust2.gif" width="98%"></td>'+
'		  <td width="15"><img src="images/listeleme/menu1_ust.gif"  width="15" height="7" ></td>'+
'         <td width="6" height="7" ><img src="images/listeleme/menu1_sagust.gif" ></td>'+
'        </tr>'+
'        <tr>'+ 
'          <td><img src="images/listeleme/menu1_sol2.gif" height="15" width="7"></td>'+
'                <td height="100" colspan="3" rowspan="3" align="center" valign="top">'+
'                  <table width="100%" border="0" cellpadding="0" cellspacing="0">'+
'                    <tr align="center" valign="middle">'+
'                      <td height="30" colspan="2"><span class="li_baslik1">'+isim+'</td>'+
'                    </tr>'+
'                    <tr>');
if(b_resim){	
	document.write('<td width="30%"><a href="javascript:popup2(\'resim_goster.php?folder=images/urunler/&resim='+b_resim+'\')"><img src="images/urunler/'+resim+'" width="80" height="80" border="0"></a></td>');
			}
else{  
	document.write('<td width="30%"><img src="images/urunler/'+resim+'" width="80" height="80" border="0"></td>');
	}

document.write('<td align="left" valign="top" width="70%" >'+
'                        <table width="100%" border="0">'+
'<tr>'+
'                            <td height="20" align="center"> '+
'<input type="button" class="buton1" onClick="sepeteAt('+id+')"  value="'+c_sepete_at+'">'+
'                            </td>'+
'                          </tr>'+
'                          <tr>'+
'                            <td height="20" align="center"><input type="button" onClick="incele('+id+')"  class="buton1"  value="'+c_incele+'"> '+
'                            </td>'+
'                          </tr>'+
'                          <tr>'+
'                           <td height="20" align="center"><input onClick="hemenAl('+id+')" type="button" class="buton1"  value="'+c_hemen_al+'">'+
'                            </td>'+
'                          </tr>'+
'                        </table>'+
'                      </td>'+
'                    </tr>'+
'                    <tr> '+
'                      <td colspan="2"><span class="k1">'+c_fiyati+' '+
'                        : </span><span class="s1">'+satis_fiyati+' '+
'                        '+birim+' '+kdv+'</span></td>'+
'                    </tr>'+
'                  </table>'+
'                  </td>'+
'                <td ><img src="images/listeleme/menu1_sag.gif" height="15" width="6"></td>'+
'        </tr>'+
'        <tr> '+
'          <td height="95"  background="images/listeleme/menu1_sol1.gif"></td>'+
'          <td width="5"  background="images/listeleme/menu1_sag2.gif"></td>'+
'        </tr>'+
'        <tr> '+
'          <td background="images/listeleme/menu1_sol1.gif"><img src="images/listeleme/menu1_sol2.gif" height="15" width="7"></td>'+
'          <td><img src="images/listeleme/menu1_sag.gif" height="15" width="6"></td>'+
'        </tr>'+
'        <tr> '+
'          <td width="6"><img src="images/listeleme/menu1_solalt.gif" ></td>'+
'          <td width="15"><img width="15" height="7" src="images/listeleme/menu1_alt2.gif" ></td>'+
'          <td background="images/listeleme/menu1_alt.gif" width="85%"></td>'+
'          <td width="15" align="right"><img width="15" height="7" src="images/listeleme/menu1_alt2.gif" ></td>'+
'          <td width="6"><img src="images/listeleme/menu1_sagalt.gif" ></td>'+
'        </tr>'+
'      </table>');

document.write('</td>');

   }

function listeleme1_tr(){ 
	document.write("</tr><tr><td height=15></td></tr><tr>");   
						}

function listeleme1_td(){ 
	document.write("<td width='5%'></td>");   
						}



						
function sepeteAt(uId){
	parent.sepetim.location.href='iframe/i_sepetim.php?sepete_at=1&uId='+uId;
						}

function hemenAl(uId){
	parent.sepetim.location.href='iframe/i_sepetim.php?hemen_al=1&uId='+uId;
						}
						
function incele(uId){
	w = 900; h = 600;
	var l = (screen.width/2)-(w/2);
	var t = (screen.height/2)-(h/2);
	window.open("urun_detaylari.php?id="+uId,"","toolbar=no,resizable,scrollbars=yes,width="+w+",height="+h+",left="+l+",top="+t);
						}

function aktif(){
	event.srcElement.className="active";
}

function pasif(){
	event.srcElement.className="text2";
}

function popup2(yol){
	w = 200; h = 150;
	var l = (screen.width/2)-(w/2);
	var t = (screen.height/2)-(h/2);
	window.open(yol,"","toolbar=no,resizable,scrollbars=no,width="+w+",height="+h+",left="+l+",top="+t);
						}
						
/*
function Yaz1_1(isim)
{
x = x + 1;
document.write('<tr>'+
'<td height="20" width="1" background="images/yan_menu/menu1_border1.gif"></td>'+
'<td valign="top"><P class=b01>&nbsp; <IMG  src="images/yan_menu/arrow.gif"  align=absMiddle border=0 name=img_block'+x+'>'+
'&nbsp; <A class="sol_menu" onClick="javascript:expandIt(\'block'+x+'\');return false;" href="#">'+isim+'</A></P>'+
'<DIV><IMG height=3 src="images/yan_menu/hr01.gif" width=137 border=0></DIV>'+		
'<DIV style="DISPLAY:none;" id="block'+x+'" >');
}	

function Yaz2_1(isim)
{
y = y+1;
document.write('<P class=b02><A class="sol_menu" href="?">&nbsp; &nbsp; &nbsp;'+isim+'</A></P>'+
'<DIV><IMG height=3 src="images/yan_menu/hr01_1.gif" width=137 border=0></DIV>');		
}

function Yaz3_1(){
document.write('</DIV></td><td width="21"></td><td width="4" background="images/yan_menu/menu1_sagborder1.gif"></td></tr>');
				}
				
*/			