function script_request_more_information()
{
document.write(
"<form method='post' action='mailto:gilmore@dynastyrug.com'>" +
"<input type='text' name='name_last' size='20' maxlength='30' value='fsdfsdf'>" +
"<input type='submit' value='Send Inquiry To Dynasty Rug'></form>"
);
}

function script_no_rug(size)
{
if (size == "69x100")
document.write(
"<img src='../../../images/69x100_blank.gif' height='100' width='69' alt='No rug'><script>script_rug_id(rug_type)</script>"
);
else if (size == "50x100")
document.write(
"<img src='../../../images/50x100_blank.gif' height='100' width='50' alt='No rug'><script>script_rug_id(rug_type)</script>"
);
else if (size == "100x100")
document.write(
"<img src='../../../images/100x100_blank.gif' height='100' width='100' alt='No rug'><script>script_rug_id(rug_type)</script>"
);
else if (size == "100x69")
document.write(
"<img src='../../../images/100x69_blank.gif' height='69' width='100' alt='No rug'><script>script_rug_id(rug_type)</script>"
);

}

function script_total_pages()
{
if (rug_type == "Art-Deco") return 2;
if (rug_type == "Chinese") return 5;
if (rug_type == "Contemporary") return 5;
if (rug_type == "European") return 3;
if (rug_type == "Neo-Classical") return 4;
if (rug_type == "Persian") return 3;
if (rug_type == "Tribal") return 15;

if (rug_type == "Horizontal") return 1;
if (rug_type == "Narrow") return 1;
if (rug_type == "Square") return 2;
if (rug_type == "Vertical") return 1;


}
function script_total_rugs()
{
//var NeoClassical = 23;
if (rug_category == "Art-Deco") return 15;
if (rug_category == "Chinese") return 38;
if (rug_category == "Contemporary") return 34;
if (rug_category == "European") return 23;
if (rug_category == "Neo-Classical") return 32;
if (rug_category == "Persian") return 20;
if (rug_category == "Tribal") return 116;

if (rug_category == "Horizontal") return 6;
if (rug_category == "Narrow") return 2;
if (rug_category == "Square") return 9;
if (rug_category == "Vertical") return 8;

}

function script_write_rug_details()
{
document.write(
"<script>script_folder_tabs('rugs')</script>" +
"<table border='0' cellpadding='0' cellspacing='0' width='100%'>" +
"<tr>" +
"<script>script_sidebar('rugs')</script>" +
"<td valign='top'>" +
"<script>script_topbar(rug_category)</script>" +
"<table border='0' cellpadding='8' cellspacing='0' width='100%'>" +
"<tr>" +
"<td valign='top'>" +

"<!--insertion_begin-->" +
"<script>rug_navigator(current_rug, total_rugs)</script>" +

"<script>script_show_description()</script>" +
"<!--<script>rug_navigator(current_rug, total_rugs)</script>-->" +
"<!--insertion_end-->" +
"</td>" +
"</tr>" +
"</table>" +
"<script>script_bottombar()</script>" +
"</td>" +
"</tr>" +
"</table>" +
"<script>script_footer()</script>"
);
}

function script_write_tapestry_details()
{
document.write(
"<script>script_folder_tabs('tapestries')</script>" +
"<table border='0' cellpadding='0' cellspacing='0' width='100%'>" +
"<tr>" +
"<script>script_sidebar('tapestries')</script>" +
"<td valign='top'>" +
"<script>script_topbar(rug_category)</script>" +
"<table border='0' cellpadding='8' cellspacing='0' width='100%'>" +
"<tr>" +
"<td valign='top'>" +

"<!--insertion_begin-->" +
"<script>rug_navigator(current_rug, total_rugs)</script>" +

"<script>script_show_description()</script>" +
"<!--<script>rug_navigator(current_rug, total_rugs)</script>-->" +
"Click <a href='mailto:leeg@uci.edu?subject=23434'>Here</a> for rug details." +
"<!--insertion_end-->" +
"</td>" +
"</tr>" +
"</table>" +
"<script>script_bottombar()</script>" +
"</td>" +
"</tr>" +
"</table>" +
"<script>script_footer()</script>"
);
}

function rug_navigator(current, total, rug_catergory)
{
var rug_prefix;
if (rug_category == "Art-Deco") rug_prefix = "ar";
if (rug_category == "Chinese") rug_prefix = "ch";
if (rug_category == "Contemporary") rug_prefix = "co";
if (rug_category == "European") rug_prefix = "eu";
if (rug_category == "Neo-Classical") rug_prefix = "ne";
if (rug_category == "Persian") rug_prefix = "pe";
if (rug_category == "Tribal") rug_prefix = "tr";

if (rug_category == "Horizontal") rug_prefix = "hz";
if (rug_category == "Narrow") rug_prefix = "na";
if (rug_category == "Square") rug_prefix = "sq";
if (rug_category == "Vertical") rug_prefix = "ve";



var prev = "";
var next = "";
if (current == 1)
{
prev = 1;

if ((current + 1) > total) next = current;
else next = current + 1;

}

if (current == total)
{
prev = current - 1;
next = current;
}

if ((current - 1) > 0) prev = current - 1;
else prev = current;
if ((current + 1) > total) next = current;
else next = current + 1;

document.write(

"<table border='0' cellpadding='8' cellspacing='0'>" +
"<tr><td align='center'>" +
"<b>Rug&nbsp;" + current_rug + "&nbsp;of&nbsp;" + total_rugs + "</b>"
);


if ((prev > 1) && (next > 1))
{
document.write(
"<form>" +
"<a href='" + rug_prefix + "-" + prev + ".html'>" +
"<img src='../../../images/arrow_left.gif' border='0'></a><img src='../../../images/browse.gif'>" +
"<a href='" + rug_prefix + "-" + next + ".html'>" +
"<img src='../../../images/arrow_right.gif' border='0'></a>" +
"</form>"
);
}
else if (( prev == 1) && (next == 1))
{
document.write(
"<form>" +
"<a href='" + rug_prefix + "-" + current + ".html'>" +
"<img src='../../../images/arrow_left.gif' border='0'></a><img src='../../../images/browse.gif'>" +
"<a href='" + rug_prefix + "-" + current + ".html'>" +
"<img src='../../../images/arrow_right.gif' border='0'></a>" +
"</form>"
);
}

else if ( prev == 1 )
{
document.write(
"<form>" +
"<a href='" + rug_prefix + "-" + prev + ".html'>" +
"<img src='../../../images/arrow_left.gif' border='0'></a><img src='../../../images/browse.gif'>" +
"<a href='" + rug_prefix + "-" + next + ".html'>" +
"<img src='../../../images/arrow_right.gif' border='0'></a>" +
"</form>"
);
}

var return_to;
var return_page;
return_to = current / 8;
if (return_to <= 1)
{
document.write(
"</td><td><a href='index.html'><b>Return to Thumbnails</b></td></tr></table>"
);
}
else
{
if (return_to <= 2) return_page = 2;
else if (return_to <= 3) return_page = 3;
else if (return_to <= 4) return_page = 4;
else if (return_to <= 5) return_page = 5;
else if (return_to <= 6) return_page = 6;
else if (return_to <= 7) return_page = 7;
else if (return_to <= 8) return_page = 8;
else if (return_to <= 9) return_page = 9;
else if (return_to <= 10) return_page = 10;
else if (return_to <= 11) return_page = 11;
else if (return_to <= 12) return_page = 12;
else if (return_to <= 13) return_page = 13;
else if (return_to <= 14) return_page = 14;
else if (return_to <= 15) return_page = 15;


document.write(
"</td><td><a href='index_" + return_page + ".html'><b>Return to Thumbnails</b></td></tr></table>"
);


}
}

function script_show_description()
{
document.write(
"<table border='0' cellpadding='0' cellspacing='0'>" +
 "<tr>" +
  "<td valign='top'>" +
"<table border='0' cellpadding='4' cellspacing='2' width='100%'>" +
"<tr bgcolor='#666666'><td colspan='2'><font class='title'>" + rug_name + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Description</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_desc + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Available Sizes</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_sizes + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Color Options</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_colors + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Category</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_category + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Price</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_price + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Background</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_background + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Border</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_border + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Material</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_material + "</td></tr>" +
"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Rug ID</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_id + "</td></tr>" +
//"<tr><td bgcolor='#e0e0e0' align='right' width='140' valign='top'><strong>Rug #</strong></td><td bgcolor='#c0c0c0' align='left' valign='top'>" + rug_number + "</td></tr>" +

"</table>" +
"</td><td bgcolor='#ffffff' valign='top'><img src='../../../images/clear.gif' width='10'></td><td>" +
"<table border='0' cellpadding='4' cellspacing='0'>" +
"<tr><td bgcolor='#c0c0c0' valign='top'>"
);

if (rug_category == "Horizontal") document.write("<img src='" + rug_id + ".jpg' height='240' width='350'></td>");
else if (rug_category == "Narrow") document.write("<img src='" + rug_id + ".jpg' height='350' width='175'></td>");
else if (rug_category == "Square") document.write("<img src='" + rug_id + ".jpg' height='350' width='350'></td>");
else if (rug_category == "Vertical") document.write("<img src='" + rug_id + ".jpg' height='350' width='240'></td>");
else document.write("<img src='" + rug_id + ".jpg' height='350' width='240'></td>");


document.write(
"</tr></table>" +
"</td></tr></table>"

);


}

function page_navigator(current, total)
{
var prev = "";
var next = "";
//var total = script_total_rugs();

if (current == 1)
{
prev = 1;

if ((current + 1) > total) next = current;
else next = current + 1;

}

if (current == total)
{
prev = current - 1;
next = current;
}

if ((current - 1) > 0) prev = current - 1;
else prev = current;
if ((current + 1) > total) next = current;
else next = current + 1;

document.write(

"<table border='0' cellpadding='8' cellspacing='0'>" +
"<tr><td align='center'>" +
"<b>Page&nbsp;" + current_page + "&nbsp;of&nbsp;" + total_pages + "<br>"
//total + "choices</b>"
);


if ((prev > 1) && (next > 1))
{
document.write(
"<form>" +
"<a href='index_" + prev + ".html'>" +
"<img src='../../../images/arrow_left.gif' border='0'></a><img src='../../../images/browse.gif'>" +
"<a href='index_" + next + ".html'>" +
"<img src='../../../images/arrow_right.gif' border='0'></a>" +
"</form>"
);
}
else if (( prev == 1) && (next == 1))
{
document.write(
"<form>" +
"<a href='index.html'>" +
"<img src='../../../images/arrow_left.gif' border='0'></a><img src='../../../images/browse.gif'>" +
"<a href='index.html'>" +
"<img src='../../../images/arrow_right.gif'></a>" +
"</form>"
);
}

else if ( prev == 1 )
{
document.write(
"<form>" +
"<a href='index.html'>" +
"<img src='../../../images/arrow_left.gif' border='0'></a><img src='../../../images/browse.gif'>" +
"<a href='index_" + next + ".html'>" +
"<img src='../../../images/arrow_right.gif' border='0'></a>" +

"</form>"
);
}
document.write(
"</td></tr></table>"
);


}
var color_main = "#800000";//"#E5E5CC"; //"#ffffcc";
var color_nav_bar = "#000000"; //"e5e5cc";


function script_set_pages(current_page)
{
var rug_id = (current_page - 1) * 8;
return rug_id;
}

function script_rug_id(store)
{
rug_id = rug_id + 1;
document.write(
"<hr width='65'>"
);
if (store == "Art-Deco")
document.write("AR-" + rug_id);
else if (store == "Chinese")
document.write("CH-" + rug_id);
else if (store == "Contemporary")
document.write("CO-" + rug_id);
else if (store == "European")
document.write("EU-" + rug_id);
else if (store == "Neo-Classical")
document.write("NE-" + rug_id);
else if (store == "Persian")
document.write("PE-" + rug_id);
else if (store == "Tribal")
document.write("TR-" + rug_id);

else if (store == "Horizontal")
document.write("HZ-" + rug_id);
else if (store == "Narrow")
document.write("NA-" + rug_id);

else if (store == "Square")
document.write("SQ-" + rug_id);

else if (store == "Vertical")
document.write("VE-" + rug_id);



}

function script_under_construction()
{
document.write(
"<table border='0' cellpadding='0' cellspacing='0' width='100%'>" +
 "<tr>" +
  "<td>" +
   "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>" +
   "<h5>We are sorry but this portion of the website is currently under construction.</h5>" +
   "<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>" +
   "<p>Please check back soon!</p>" +
  "</td>" +
 "</tr>" +
"</table>"
);
}

function script_select_image()
{
if (document.images) document.images['Main_Image'].src = strMain_Image;
}

function script_get_random_number()
{
today = new Date();
jran = today.getTime();
var number = 4;
var random_number = "";
var image = "";
var text_color = "";
ia=9301;
ic=49297;
im=233280;
jran = (jran*ia+ic) % im;
random_number = Math.ceil( (jran/(im*1.0)) *number);
return random_number;
}

function script_url_dropdown(it)
{
if(it > " ")
{
location.href=it;
}
}

function store_show_description(which)
{
if (document.images) eval('document.images["description"].src=store_description_images['+ which +'].src');
}

function store_menu_over(which)
{
if (document.images) eval('document.images["store_'+which+'"].src=store_menu_on['+ which +'].src');
}

function store_menu_out(which)
{
if (document.images) eval('document.images["store_'+which+'"].src=store_menu_off['+ which +'].src');
}

function sidebar_menu_over(which)
{
if (document.images) eval('document.images["sidebar_'+which+'"].src=sidebar_menu_on['+ which +'].src');
}

function sidebar_menu_out(which)
{
if (document.images) eval('document.images["sidebar_'+which+'"].src=sidebar_menu_off['+ which +'].src');
}

function script_date()
{
var day = "";
var month = "";
var year = "";
mydate = new Date();
myday = mydate.getDay();
mymonth = mydate.getMonth();
myweekday = mydate.getDate();
myyear = mydate.getYear();
year = (myyear > 99) ? myyear : 1900 + myyear;
if (myday == 0) day = "Sunday, ";
else if (myday == 1) day = "Monday, ";
else if (myday == 2) day = "Tuesday, ";
else if (myday == 3) day = "Wednesday, ";
else if (myday == 4) day = "Thursday, ";
else if (myday == 5) day = "Friday, ";
else if (myday == 6) day = "Saturday, ";
if (mymonth == 0) month = "January ";
else if (mymonth == 1) month = "February ";
else if (mymonth == 2) month = "March ";
else if (mymonth == 3) month = "April ";
else if (mymonth == 4) month = "May ";
else if (mymonth == 5) month = "June ";
else if (mymonth == 6) month = "July ";
else if (mymonth == 7) month = "August ";
else if (mymonth == 8) month = "September ";
else if (mymonth == 9) month = "October ";
else if (mymonth == 10) month = "November ";
else if (mymonth == 11) month = "December ";
document.write(
"<font class='small' color='#c0c0c0'>" + day, month, myweekday, ", ", year + "&nbsp;</font>"
);
}

function script_footer()
{
document.write(
"<table bgcolor='" + color_main + "' border='0' cellpadding='0' cellspacing='0' width='100%' height='18'>" +
 "<tr>" +
  "<td align='left' width='1%'><img src='http://www.dynastyrug.com/images/corner_bottom_left.gif'></td>" +
  "<td align='middle' width='98%'>&nbsp;</td>" +
  "<td align='right' width='1%'><img src='http://www.dynastyrug.com/images/corner_bottom_right.gif'></td>" +
 "</tr>" +
"</table>" +
"<table bgcolor='#ffffff' border='0' cellpadding='0' cellspacing='0' width='100%'>" +
 "<tbody>" +
  "<tr>" +
   "<td><img height='4' src='http://www.dynastyrug.com/images/space.gif' width='1'></td>" +
  "</tr>" +
 "</tbody>" +
"</table>" +
"</td></tr></table>"
);
}


function script_sidebar(category)
{
document.write(
"<td width='1' bgcolor='" + color_main + "' valign='top'>" +
"<table bgcolor='" + color_main + "' border='0' cellpadding='2' cellspacing='0' width='100%'>" +
//<tr><td><img src='http://www.dynastyrug.com/images/space.gif' width='140' height='1'></td></tr>" +
  "<tr>" +
  "<td>" +
"<img src='http://www.dynastyrug.com/images/sidebar_header.gif'><img src='http://www.dynastyrug.com/images/arrow_orange_down.gif' hspace='5' align='absmiddle'>" +

   "</td>" +
  "</tr>"

);
if (category == "home")
document.write(

"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/index.html'>&#0149;&nbsp;Home<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/index.html'>&#0149;&nbsp;Online Gallery<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/purchase_procedure.html'>&#0149;&nbsp;Choosing a Rug<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/how_to_order.html'>&#0149;&nbsp;How to Order<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/rug_tips.html'>&#0149;&nbsp;Rug Tips<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/services.html'>&#0149;&nbsp;Services<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/about_dynasty.html'>&#0149;&nbsp;About Dynasty<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/contact_us.html'>&#0149;&nbsp;Contact Us<a></td></tr>" +

"</table>"
);
else if (category == "rugs")
document.write(
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/art-deco/index.html'>&#0149;&nbsp;Art-Deco<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/chinese/index.html'>&#0149;&nbsp;Chinese</a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/contemporary/index.html'>&#0149;&nbsp;Contemporary</a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/european/index.html'>&#0149;&nbsp;European</a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/neo-classical/index.html'>&#0149;&nbsp;Neo-Classical</a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/persian/index.html'>&#0149;&nbsp;Persian</a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/tribal/index.html'>&#0149;&nbsp;Tribal</a></td></tr>" +

"</table>"
);
else if (category == "tapestries")
document.write(
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/tapestries/horizontal/index.html'>&#0149;&nbsp;Horizontal<a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/tapestries/narrow/index.html'>&#0149;&nbsp;Narrow</a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/tapestries/square/index.html'>&#0149;&nbsp;Square</a></td></tr>" +
"<tr bgcolor='' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/tapestries/vertical/index.html'>&#0149;&nbsp;Vertical</a></td></tr>" +
"</table>"
);
else if (category == "accessories")
document.write(
"<tr bgcolor='' align='right' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/art-deco/index.html'>Art-Deco<img src='http://www.dynastyrug.com/images/ball_gold.gif' border='0' width='8' height='8' hspace='5' align='absmiddle'></a></td></tr>" +
"<tr bgcolor='' align='right' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/chinese/index.html'>Chinese<img src='http://www.dynastyrug.com/images/ball_gold.gif' border='0' width='8' height='8' hspace='5' align='absmiddle'></a></td></tr>" +
"<tr bgcolor='' align='right' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/contemporary/index.html'>Contemporary<img src='http://www.dynastyrug.com/images/ball_gold.gif' border='0' width='8' height='8' hspace='5' align='absmiddle'></a></td></tr>" +
"<tr bgcolor='' align='right' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/european/index.html'>European<img src='http://www.dynastyrug.com/images/ball_gold.gif' border='0' width='8' height='8' hspace='5' align='absmiddle'></a></td></tr>" +
"<tr bgcolor='' align='right' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/neo-classical/index.html'>Neo-Classical<img src='http://www.dynastyrug.com/images/ball_gold.gif' border='0' width='8' height='8' hspace='5' align='absmiddle'></a></td></tr>" +
"<tr bgcolor='' align='right' valign='middle'><td nowrap><a class='sidebar' href='http://www.dynastyrug.com/stores/rugs/persian/index.html'>Persian<img src='http://www.dynastyrug.com/images/ball_gold.gif' border='0' width='8' height='8' hspace='5' align='absmiddle'></a></td></tr>" +
"</table>");
document.write(

 //     "</td>" +
 //    "</tr>" +
 //   "</table>" +
"</td>"
);
}



function script_bottombar()
{
document.write(
"<table bgcolor='#000000' border='0' cellpadding='2' cellspacing='0' width='100%'>" +
 "<tr>" +
  "<td width='1%'><a href='#top'><img src='http://www.dynastyrug.com/images/arrow_orange_up.gif' border='0'></a></td>" +
  "<td width='1%'><a href='#top'><img src='http://www.dynastyrug.com/images/bottombar_return_to_top.gif' border='0'></a></td>" +
  "<td width='98%' align='right'><font class='small' color='#c0c0c0'>&copy2000 Dynasty Rug Company. All rights reserved.&nbsp;</font></td>" +
 "</tr>" +
"</table>"
);
}

function script_topbar(header)
{
var location = "";
if (header == "home") location = "<img src='images/location_home.gif'>";

else if (header == "tapestries") location = "<img src='../../images/location_tapestries.gif' height='16'>";
else if (header == "accessories") location = "<img src='../../images/location_accessories.gif' height='16'>";
else if (header == "online_gallery") location = "<img src='images/location_online_gallery.gif' height='16'>";
else if (header == "purchase_procedure") location = "<img src='images/location_purchase_procedure.gif' height='16'>";
else if (header == "rug_tips") location = "<img src='images/location_rug_tips.gif' height='16'>";
else if (header == "how_to_order") location = "<img src='images/location_how_to_order.gif' height='16'>";
else if (header == "services") location = "<img src='images/location_services.gif' height='16'>";
else if (header == "about_dynasty") location = "<img src='images/location_about_dynasty.gif' height='16'>";
else if (header == "contact_us") location = "<img src='images/location_contact_us.gif' height='16'>";
else if (header == "rugs") location = "<img src='../../images/location_rugs.gif' height='16'>";

else if (header == "European") location = "<img src='../../../images/location_european.gif' height='16'>";
else if (header == "Persian") location = "<img src='../../../images/location_persian.gif' height='16'>";
else if (header == "Chinese") location = "<img src='../../../images/location_chinese.gif' height='16'>";
else if (header == "Neo-Classical") location = "<img src='../../../images/location_neo-classical.gif' height='16'>";
else if (header == "Art-Deco") location = "<img src='../../../images/location_art-deco.gif' height='16'>";
else if (header == "Contemporary") location = "<img src='../../../images/location_contemporary.gif' height='16'>";
else if (header == "Tribal") location = "<img src='../../../images/location_tribal.gif' height='16'>";
else if (header == "Horizontal") location = "<img src='../../../images/location_horizontal.gif' height='16'>";
else if (header == "Narrow") location = "<img src='../../../images/location_narrow.gif' height='16'>";
else if (header == "Square") location = "<img src='../../../images/location_square.gif' height='16'>";
else if (header == "Vertical") location = "<img src='../../../images/location_vertical.gif' height='16'>";



document.write(
"<table bgcolor='#000000' border='0' cellpadding='2' cellspacing='0' width='100%'>" +
 "<tr>" +

  "<td width='1%'>" + location + "</td>" +
  "<td width='1%'><img src='http://www.dynastyrug.com/images/arrow_orange_down.gif' border='0'></td>" +
  "<td width='98%' align='right'><script>script_date()</script></td>" +
 "</tr>" +
"</table>"
);
}

function script_title(title)
{
document.write(
"<table bgcolor='#666666' border='0' cellpadding='4' cellspacing='0' width='100%'>" +
 "<tr>" +
  "<td><font class='title'>", title, "</font></td>" +
 "</tr>" +
"</table>"
);
}


function script_folder_tabs(store)
{
var home = "#666666";
var rugs = "#666666";
var tapestries = "#666666";
var accessories = "#666666";
var tab_home = "gray";
var tab_rugs = "gray";
var tab_tapestries = "gray";
var tab_accessories = "gray";
if (store == "home") home = "" + color_main + "", tab_home = "red";
else if (store == "rugs") rugs = "" + color_main + "", tab_rugs = "red";
else if (store == "tapestries") tapestries = "" + color_main + "", tab_tapestries = "red";
else if (store == "accessories") accessories = "" + color_main + "", tab_accessories = "red";
document.write(
"<table bgcolor='#ffffff' border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td>" +
"<table bgcolor='#ffffff' border='0' cellpadding='0' cellspacing='0' width='100%'>" +
 "<tbody>" +
  "<tr>" +
   "<td><img height='4' src='http://www.dynastyrug.com/images/space.gif' width='1'></td>" +
  "</tr>" +
 "</tbody>" +
"</table>" +

"<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr>" +
"<td>" +

"<table bgcolor='#666666' border='0' cellpadding='0' cellspacing='0'>" +
 "<tbody>" +
  "<tr>" +
   "<td bgcolor='" + home + "' align='left'><img height='18' src='http://www.dynastyrug.com/images/corner_left.gif'></td>" +
   "<td bgcolor='" + home + "'><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td bgcolor='" + home + "' align='middle'><a href='http://www.dynastyrug.com/index.html'><img src='http://www.dynastyrug.com/images/tab_" + tab_home + "_home.gif' height='16' width='33' border='0'></a></td>" +
   "<td bgcolor='" + home + "'><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td bgcolor='" + home + "' align='right'><img height='18' src='http://www.dynastyrug.com/images/corner_bar.gif'></td>" +
//"<td bgcolor='#ffffff'><img src='http://www.dynastyrug.com/images/space.gif' width='3'></td>" +
   "<td bgcolor='" + rugs + "' align='left'><img height='18' src='http://www.dynastyrug.com/images/corner_left.gif'></td>" +
   "<td bgcolor='" + rugs + "'><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td bgcolor='" + rugs + "' align='middle'><a href='http://www.dynastyrug.com/stores/rugs/index.html'><img src='http://www.dynastyrug.com/images/tab_" + tab_rugs + "_rugs.gif' height='16' width='31' border='0'></a></td>" +
   "<td bgcolor='" + rugs + "'><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td bgcolor='" + rugs + "' align='right'><img height='18' src='http://www.dynastyrug.com/images/corner_bar.gif'></td>" +
//"<td bgcolor='#ffffff'><img src='http://www.dynastyrug.com/images/space.gif' width='3'></td>" +
   "<td bgcolor='" + tapestries + "' align='left'><img height='18' src='http://www.dynastyrug.com/images/corner_left.gif'></td>" +
   "<td bgcolor='" + tapestries + "'><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td bgcolor='" + tapestries + "' align='middle'><a href='http://www.dynastyrug.com/stores/tapestries/index.html'><img src='http://www.dynastyrug.com/images/tab_" + tab_tapestries + "_tapestries.gif' height='16' width='66' border='0'></a></td>" +
   "<td bgcolor='" + tapestries + "'><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td bgcolor='" + tapestries + "' align='right'><img height='18' src='http://www.dynastyrug.com/images/corner_bar.gif'></td>" +
//"<td bgcolor='#ffffff'><img src='http://www.dynastyrug.com/images/space.gif' width='3'></td>" +
   "<td bgcolor='" + accessories + "' align='left'><img height='18' src='http://www.dynastyrug.com/images/corner_left.gif'></td>" +
   "<td bgcolor='" + accessories + "'><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td bgcolor='" + accessories + "' align='middle'><a href='http://www.dynastyrug.com/stores/accessories/index.html'><img src='http://www.dynastyrug.com/images/tab_" + tab_accessories + "_accessories.gif' height='16' width='76' border='0'></a></td>" +
   "<td bgcolor='" + accessories + "'><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td bgcolor='" + accessories + "' align='right'><img height='18' src='http://www.dynastyrug.com/images/corner_bar.gif'></td>" +
  "</tr>"
);
// Implemented to handle background color errors when viewed with Netscape
if (home == "" + color_main + "") rugs = "#333333", tapestries = "#333333", accessories = "#333333";
else if (rugs == "" + color_main + "") home = "#333333", tapestries = "#333333", accessories = "#333333";
else if (tapestries == "" + color_main + "") home = "#333333", rugs = "#333333", accessories = "#333333";
else if (accessories == "" + color_main + "") home = "#333333", rugs = "#333333", tapestries = "#333333";
document.write(
  "<tr bgcolor='#333333'>" +
   "<td bgcolor='" + home + "' colspan='5' height='1'><img height='1' src='http://www.dynastyrug.com/images/space.gif' width='1'></td>" +
   "<td bgcolor='" + rugs + "' colspan='5' height='1'><img height='1' src='http://www.dynastyrug.com/images/space.gif' width='1'></td>" +
   "<td bgcolor='" + tapestries + "' colspan='5' height='1'><img height='1' src='http://www.dynastyrug.com/images/space.gif' width='1'></td>" +
   "<td bgcolor='" + accessories + "' colspan='5' height='1'><img height='1' src='http://www.dynastyrug.com/images/space.gif' width='1'></td>" +
  "</tr>" +
 "</tbody>" +
"</table>" +
"</td>" +
"<td width='100%'>" +
"<table bgcolor='#666666' border='0' cellpadding='0' cellspacing='0' width='100%'>" +
 "<tbody>" +
  "<tr>" +
   "<td align='left'><img height='18' src='http://www.dynastyrug.com/images/corner_left.gif'></td>" +
   "<td><img src='http://www.dynastyrug.com/images/space.gif' width='20' height='1'></td>" +
   "<td align='right'><img height='18' src='http://www.dynastyrug.com/images/corner_right.gif'></td>" +

  "</tr>" +
  "<tr bgcolor='#333333'>" +
   "<td colspan='3' height='1'><img height='1' src='http://www.dynastyrug.com/images/space.gif' width='1'></td>" +
"</tr>" +
 "</tbody>" +
"</table>" +
"</td></tr></table>" +


"<table bgcolor='" + color_main + "' border='0' cellpadding='6' cellspacing='0' width='100%'>" +
 "<tr>" +
       "<td align='center'><img src='http://www.dynastyrug.com/images/logo_company.gif' height='90' width='436'></td>" +
 "</tr>" +
"</table>"
//"<table border='0' cellpadding='0' cellspacing='0'><tr><td width='100%'>"
);
}

