function show_full_edit()
{
 document.all.full.src = document.all.full_img.value;
}
   


function show_ad_image1()
{
 var ext = document.all.image1.value.split(".");
 for(var j=0; j<ext.length; j++)
 {
 	lext = ext[j];
 }
 if ( lext != "swf" )
 {
 	 if (document.getElementById('ad_imagediv1')) document.getElementById('ad_imagediv1').style.visibility = 'visible';
 	 if (document.getElementById('ad_imagediv1')) document.getElementById('ad_imagediv1').style.display = 'block';
 	 if (document.getElementById('ad_imagediv11')) document.getElementById('ad_imagediv11').style.visibility = 'hidden';
 	 if (document.getElementById('ad_imagediv11')) document.getElementById('ad_imagediv11').style.display = 'none';
	 document.all.img1.src = document.all.image1.value;
 }
 else
 {
 	 if (document.getElementById('ad_imagediv1'))  document.getElementById('ad_imagediv1').style.visibility = 'hidden';
 	 if (document.getElementById('ad_imagediv1'))  document.getElementById('ad_imagediv1').style.display = 'none';
 	 if (document.getElementById('ad_imagediv11'))  document.getElementById('ad_imagediv11').style.visibility = 'hidden';
 	 if (document.getElementById('ad_imagediv11'))  document.getElementById('ad_imagediv11').style.display = 'none';
	
 }
}

function show_ad_image2()
{
 document.getElementById('ad_imagediv2').style.visibility = 'visible';
 document.getElementById('ad_imagediv2').style.display = 'block';
 document.all.img2.src = document.all.image2.value;
}
function show_ad_image3()
{
 document.getElementById('ad_imagediv3').style.visibility = 'visible';
 document.getElementById('ad_imagediv3').style.display = 'block';
 document.all.img3.src = document.all.image3.value;
}
function show_ad_image4()
{
 document.getElementById('ad_imagediv4').style.visibility = 'visible';
 document.getElementById('ad_imagediv4').style.display = 'block';
 document.all.img4.src = document.all.image4.value;
}
function show_ad_image5()
{
 document.getElementById('ad_imagediv5').style.visibility = 'visible';
 document.getElementById('ad_imagediv5').style.display = 'block';
 document.all.img5.src = document.all.image5.value;
}


function page_name_change(str)
{
 	str_url = str + document.getElementById("page_name").value;
	location.href=str_url;
}


function show_thumb_edit()
{
 document.all.thumb.src = document.all.thumb_img.value;	 
}



function show_full()
{
 document.getElementById('fulldiv').style.visibility = 'visible';
 document.getElementById('fulldiv').style.display = 'block';
 document.all.full.src = document.all.full_img.value;
}

function show_thumb()
{
 document.getElementById('thumbdiv').style.visibility = 'visible'; 
 document.getElementById('thumbdiv').style.display = 'block';
 document.all.thumb.src = document.all.thumb_img.value;	 
}

function confirm_delete()
{
	var val;
	val = confirm("Do you want to delete?");
	return val;
}

function change_status(str,id)
{
    var idd ;
	idd = 'status'+id;
	var stat;
	stat = document.all[idd].value;
	str += str+'&amp;status='+stat;
	location.href=str;
}

function confirm_remove()
{
	var val;
	val = confirm("Do you want to remove?");
	return val;
}

function change_color(tr)
{
  if(document.all)
  {
     document.getElementById(tr).style.backgroundColor = '#d5e5de';  
  }
}


function change_color1(tr)
{
  var no ;
  no = tr.substr(2,tr.length);
   if(document.all)
  {
    if( no%2 == 0)
	 document.getElementById(tr).style.backgroundColor = '#ffffff';  
    else
	document.getElementById(tr).style.backgroundColor = '#f5f7f9';  
  }
}


function showthumb(str)
{
  var arg = 'resizable=no, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=700,height=700,top=20,left=250';
  window.open(str, "_blank", arg);
}

function show_popup_price()
{
  var arg = 'resizable=no, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=620,height=350,top=20,left=250';
  window.open("templates/popup_price.html", "_blank", arg);
}



function show_free_client_popup(str)
{
  var arg = 'resizable=no, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=500,height=500,top=20,left=250';
  window.open(str, "_blank", arg);
}

function show_custom_client_popup(str)
{
  var arg = 'resizable=no, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=600,height=850,top=20,left=250';
  window.open(str, "_blank", arg);
}

function show_buy_client_popup(str)
{
  var arg = 'resizable=no, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=500,height=450,top=20,left=250';
  window.open(str, "_blank", arg);
}


function chcek_numeric(e)
{

	var isIE = (window.event) ? 1 : 0;
	if (isIE)
	{
		if (e.keyCode < 46 || e.keyCode >57 ) 
		{ 
			if ( e.keyCode != 8 ) e.returnValue = false;
		}
	}
	else
	{

		if ( e.which < 46 || e.which >57 ) 
		{
			if ( e.which != 8 ) e.preventDefault();
		}
	}

}

function chcek_float(e)
{
	var isIE = (window.event) ? 1 : 0;
	if (isIE)
	{
		if (e.keyCode < 46 || e.keyCode >57 ) 
		{ 
			e.returnValue = false;
		}
	}
	else
	{

		if ( e.which < 46 || e.which >57 ) 
		{
			if ( e.which != 8 ) e.preventDefault();
		}
	}

}




function info_check()
{
  var stremail1 = document.myform.contact_email.value;
  var stremail2 = document.myform.ship_email.value;
  var emailchar = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;

 if (document.getElementById("contact_first_name").value=="") 
  {
	  alert("Please Enter First Name.");
	  return false;
  }
  else if (document.getElementById("is_ship_same").checked==false) 
  {
	  if (document.getElementById("ship_first_name").value=="") 
	  {
		  alert("Please Enter First Name For Shipping Address.");
		  return false;
	  }
	  else if (document.getElementById("ship_last_name").value=="") 
	  {
		  alert("Please Enter Last Name For Shipping Address.");
		  return false;
	  }
  }
return true;
}


function enable_another_email()
 {
	  if (document.contact_info.is_another_email.checked==true)  document.contact_info.another_email.disabled=false;
	  else document.contact_info.another_email.disabled=true;
 }
 
function set_focus_login()
{
document.getElementById("name").focus();
}

function confirm_deny()
{
	var val;
	val = confirm("Do you want to deny the request?");
	return val;
}
function confirm_accept()
{
	var val;
	val = confirm("Do you want to accept the request?");
	return val;
}